Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to find unique rows of ProjectName and sum the values under Budget.
ProjectName | Budget |
---|---|
1 | 123 |
1 | 123 |
2 | 456 |
2 | 456 |
3 | 789 |
4 | 101112 |
4 | 101112 |
5 | 131415 |
6 | 161718 |
7 | 42 |
sum(aggr(sum(DISTINCT Budget), ProjectName))
^ would that work?
And how do I modify the code to make it sum, regardless of what rows are selected?
Hi,
Try like this
=Sum({1}Distinct Budget) or Sum({1}Budgets)
-Regardless of dimension
Hi,
Use ProjectName as Dimension and use expression like this
sum(aggr(sum(DISTINCT Budget), ProjectName))
or
Test:
LOAD * Inline [
ProductName,Budget
x,4
x,4
y,5
y,5
];
Data2:
LOAD ProductName, Sum(DISTINCT Budget) as Budgets Resident Test
Group By ProductName;
Hope it helps
Thanks! I'm using it in a Text object and I want to report the entire sheet's sum, regardless of selection. How is this done?
Hi,
Test:
LOAD * Inline [
ProductName,Budget
x,4
x,4
y,5
y,5
];
Data2:
LOAD ProductName, Sum(DISTINCT Budget) as Budgets Resident Test
Group By ProductName;
(or)
In text box,
use like this
=Sum(Distinct Budget) or Sum(Budgets)
itself give all distinct value in textbox. when you select dimension, values changes according to your selection.
Hope it helps
Mayil Vahanan Ramasamy wrote:
when you select dimension, values changes according to your selection.
Hope it helps
Yes, but I want the value to stay the same, regardless of selection. I'm reporting the total, for the entire sheet.
Thank you.
Hi,
Try like this
=Sum({1}Distinct Budget) or Sum({1}Budgets)
-Regardless of dimension