Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All ,
I want to know how do we get the Sum(sales) only for field department ?
Hi John,
Could you elaborate the requirement bit more..!!
It would be same
=SUM(Sales)
same
Sum(sales)
if yu want for specific department
then it would be
sum({<Department={'DepartmentName'}>}Sales)
I want to display the sales value only for a field by name department ,
When i say Department it is Field name ,
So according to your expression it should display me the sales for the field Department right ?
sum({<Department={'DepartmentName'}>}Sales)
try this
sum({<Department={"=sum(Sales)>0"}>}Sales)
yes , you should have the Department as Dimension and then in expression you can try like
sum(sales) : to get the sales for all the department
sum({<Department={'A'}>}sales): to get the sales for only department A
like this you can change the expression accordingly
Hi,
As mentioned by other the standard set analysis should get the answer you want.
I.e. SUM({<Department={1}>}Sales)
But I guess it really depends how you data is laid out, I think we are all assuming it is like below.
Department | Sales |
---|---|
1 | 100 |
2 | 200 |
1 | 100 |
2 | 200 |
1 | 100 |
2 | 200 |
and you are wanting the sales for say department 1? I.e. 300 in the above example.
Then the set analysis of SUM({<Department={1}>}Sales) will return the required value.
If this is not correct, could you please supply an example of your data?
Mark
Good that you got the answer but actually your question itself was not complete...
Can you check below two expressions and let me know if you are getting any different result !
=SUM(Sales)
and
=SUM({<Department = {"=SUM(Sales) > 0"}>}Sales)