Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
For example:
Income | Managed Section 05 |
---|---|
500 | Cats |
600 | Cats |
784 | Dogs |
839 | Cats |
541 | Dogs |
I want to know the SUM income of all field names "Cats" under "Managed Section 05"
sum( { < [Managed Section 05] = {"Cats"} > } Income)
It is called "Set Analysis". If you search on that, you will find a lot of information.
sum( { < [Managed Section 05] = {"Cats"} > } Income)
It is called "Set Analysis". If you search on that, you will find a lot of information.
create a pivot chart with expression
sum(income) and dimension as Managed Section 05
enable partial sum from object properties > presentation tab
Hi Ricky,
Please use the below code..
Sum( { < [Managed Section 05] = {‘Cats’} > } Income)
Regards,
Rajesh R. S.
You can perform this by using set expressions.
Let me explain, Sum(income) is the expression we're working with. Now, if I want to just focus on some income, like in your case, juste sum(income) of the cats.
This is how we should proceed, go to same expression and edit it as follow:
1) the first step is to add {<>} : sum({<>}income) : this is where we're going to add our 'condition'
2) enter the condition : [Managed Section 05] = {‘Cats’}
a) Let's explain this: [Managed Section 05] is the field we're working with. We want to make selections in the field. In fact we want only to work with "Cats" => [Managed Section 05]= { 'Cats' } (we allways open the {} to put a value in, if the value is numeric, don't use quotes , if it's a string like in our case, use the quotes; if it's an expression, please surround it with double quotes..)
3) Now, the expression has become like this : sum({< [Managed Section 05] = {‘Cats’} >} income) : and this is how we read it : The sum of income for the managed section05 which has a value = Cats.
Hope this answered your question !
Omar,
Rajesh RS wrote:
Hi Ricky,
Please use the below code..
Sum( { < [Managed Section 05] = {‘Cats’} > } Income)
Regards,
Rajesh R. S.
Fantastic. So I have a few follow-up questions/concerns:
I created:
Count ( { < Managed Section 05 ] = { 'Cats'} > } Income ) .... which worked fine only if I "inserted" income by using the add fields tool to the right. Also, for some reason it duplicated the values but I simply divided by 2. Why did it duplicate?
Now, instead of 'Income' I want to add a different field - 'ID' - for which I have to know the count of distinct Cat IDs (some repeat):
ID | Managed Section 05 |
---|---|
RS34 | Cats |
KA78 | Dogs |
ST56 | Cats |
HG49 | Dogs |
TY87 | Cats |
RS34 | Cats |
TY87 | Cats |
ST56 | Cats |
GH65 | Dogs |
MD12 | Dogs |
KI90 | Cats |
The following attempt didn't work:
Count ( { < Managed Section 05 ] = { 'Cats'} > } Count ( { Count ( { 1 } distinct ID ) )
Why? All the help is much appreciated!
Fantastic. So I have a few follow-up questions/concerns:
I created:
Count ( { < Managed Section 05 ] = { 'Cats'} > } Income ) .... which worked fine only if I "inserted" income by using the add fields tool to the right. Also, for some reason it duplicated the values but I simply divided by 2. Why did it duplicate?
Now, instead of 'Income' I want to add a different field - 'ID' - for which I have to know the count of distinct Cat IDs (some repeat):
ID | Managed Section 05 |
---|---|
RS34 | Cats |
KA78 | Dogs |
ST56 | Cats |
HG49 | Dogs |
TY87 | Cats |
RS34 | Cats |
TY87 | Cats |
ST56 | Cats |
GH65 | Dogs |
MD12 | Dogs |
KI90 | Cats |
The following attempt didn't work:
Count ( { < Managed Section 05 ] = { 'Cats'} > } Count ( { Count ( { 1 } distinct ID ) )
Why? All the help is much appreciated!
Fantastic. So I have a few follow-up questions/concerns:
I created:
Count ( { < Managed Section 05 ] = { 'Cats'} > } Income ) .... which worked fine only if I "inserted" income by using the add fields tool to the right. Also, for some reason it duplicated the values but I simply divided by 2. Why did it duplicate?
Now, instead of 'Income' I want to add a different field - 'ID' - for which I have to know the count of distinct Cat IDs (some repeat):
ID | Managed Section 05 |
---|---|
RS34 | Cats |
KA78 | Dogs |
ST56 | Cats |
HG49 | Dogs |
TY87 | Cats |
RS34 | Cats |
TY87 | Cats |
ST56 | Cats |
GH65 | Dogs |
MD12 | Dogs |
KI90 | Cats |
The following attempt didn't work:
Count ( { < Managed Section 05 ] = { 'Cats'} > } Count ( { Count ( { 1 } distinct ID ) )
Why? All the help is much appreciated!
Now, that we have executed the first step; we want to be able to count the distinct id for the cats?
Here's how you perform it :
1) The basic expression is : count(distinct ID)
2) Now we want to count the distinct ID of specific thing : cats
=> count(distinct {<[Managed Section 05]={'Cats'}>} ID)
What this does is: count the distinct ID for the Cats.
If I want to count the distinct ID for every managed section (cats, dogs, or whatever)
Use a table:
- As dimension: [Managed Section 05]
- measure: count(distinct {<[Managed Section 05]=>} ID)
=> which means, count distinct id for all the managed section
Thanks, works great.