Calculated Field Expression, sum of field with specific values - amazon-quicksight

I have a Feature field that has 4 different values (Features 1-4). There's also a use case field that has a set of values (usecase 1-4) and another set of values (usecase 5-8).
I would like to find the sum of (usecase1-4), that also contains feature1-2 from the Feature field. Same with (usecase5-8) that contains feature3-4.
screenshot for a visual:
enter image description here
How would I accomplish this?
I tried sumOver(sum(count, [Feature], [usecase])) but that gave me the same numbers of the total column. Am I thinking about the partitions wrong?

Related

Writing a formula in a cell in Google Sheets that averages the results from a column derived from expected values in multiple columns

I'm an average user of Google sheets and I've tried writing/looking up the formula I'm going for, but I haven't had any luck yet.
I have a spreadsheet that details multiple values that I need to display in a single cell the average of a certain set of values derived from a specific set of those values from multiple columns.
The flow of information would look something along the lines of:
if value in Column D=L
then
if value in Column J<$1.20
then
Find Avg of all Values in Column N
I'd need the formula to narrow it's field of data each time so the final result was the average of all the values in Column N that had a value in column J<$1.20 with a value in Column D=L.
I feel like a dummy over here because I just can't narrow down how I should write this flow and get it to work right without adding multiple extra hidden columns. Can anyone help on this one?
I've tried writing the formula multiple different ways but haven't kept it written down to pass on.

Qlikview - show first and last selected value in list

I need to display first and last selected value in list. I have listbox and when I pick date I got this result in list
I want to get in one box min value selected but when I use minString(Data) I got 22/2022 instead 303/202. And for max I need to get 306/2022.
Can anyone help please?
To get the Qlik engine to ignore the selected values you need to set analysis.
Firstly, you should be using a max() not a maxstring(). Max() will evaluate the maximum numerical value. Maxstring() will evaluate the maximum ascii values of the string (I think, anyone can correct me).
Secondly, the value 306/2022 in that list is grey which means it is no longer included in the dataset used for the visualisations being displayed. The white values are the values that are included, this is why min(Date) is returing 22/2022. 22/2022 is the minimum available (white) value in that list. 303/2022 is the minimum value of the excluded values in grey.
If you want to be able to reference the values even when the selections have caused it to be excluded (turned them grey) you need to modify your max() to max({1}).
{1} means look at all the data not just the selected data.
max({1} Date)
will return 306/2022 no matter what the selections are.
If you want to return 303/2022. The minimum of the excluded values and have that change dynamically when making other selections let me know and I can show you but I will require you to explain why you would want to that before I try figure it out :)
You can try using the OnOpen document trigger.
enter image description here

Is it possible to multiply by -1 in a CRM Dynamics 2016 Workflow?

I'm trying to create a workflow that would make the target field value a negative number. I want to create related records as credits and debits and then be able to sum them up to get a net value.
I've tried to update the field to -1 and then multiply it accordingly, but I get an error stating that the value needs to be between 0 and 1,000,000,000,000. I've also just tried to multiply the value by a -1, but that doesn't work either. It just runs the workflow, but doesn't change the value.
Building on the comment from #MarioZG it looks like your CRM field doesn't allow negative numbers.
When you setup a number field (Decimal; Currency; Floating or Whole Number) you can specify the range of acceptable values. Here's a quick screenshot of the Whole Number's properties:
I actually figured this one out. I created two different workflows to create records in one entity with different "Types". Then, on the account I had a rollup field to sum one type and then a rollup type to sum the other type. Then I used a calculated field to subtract one from the other.
Use data type of the field as decimal number(looking at your use), in this case you will have flexibility of storing all sort of numbers.

How do I specify columns to include in a matrix

I have a matrix that has a group filtered at the matrix level. I can't filter the SQL because it is very large and is used all over my report.
I need to be able to specify the columns to display after the filter is applied.
The end filter would look something like this
if ColumnA[value] IN Test1,Test2,Test3 OR ColumnB[name]
As you can see I want a value string filter and make sure ColumnB get displayed at all times.
Or being able to specify the columns to show in the matrix would work also.
You can filter at the dataset level: see here for more detail.
To filter a tablix, go into Tablix Properties and open up the Filters tab. You can write a Boolean expression (must evaluate to TRUE for the record to come into the Tablix) to do the filtering there.
I ended up using a tablix and creating columns for each column I wanted to display and rows for each row item. I then used a Count(IIF()) statement to match the specific item I needed to calculate for that cell. I wanted to use the matrix so it would not be so long winded but in the end I got the job done. I have since used this method on many occasions.

Browse field data shows value, but displays another value

I have a formula written for a field in Crystal Reports. When i refresh the report, i get a different value from the formula. The required value is always the last value in Browse Field Data dialog for that formula.
Isnt the formula supposed to have only one value as output? why are multiple values shown in browse field data dialog.? Is there a way to retrieve last value of Browse File Data dialog?
My formula looks like below:
WHILEREADINGRECORDS;
NumberVar CODTOTAL;
if {XXX.YYY} = 1 then
( CODTOTAL := CODTOTAL + {XXX.ZZZ};
);
CODTOTAL;
Browse field data shows all the values "CODTOTAL" acquires as a result of that formula and displays a random value amongst the assigned value.
Please help me out. I am amateur in crystal reports.
Any help would be highly appreciated.
~Regards.
First observation should be where have you placed the formula (Details, Footer.. etc).
why are multiple values shown in browse field data dialog.?
Browse field shows the data that is present in the table but in your case you are applying "If" condition of the filed. It can be possible that there is only one record that satisfies your condition.
I would suggest to run the report without the codition, Check the results and apply the condition and check results again.

Resources