Forum Discussion
Total Sum
Hi All,
Sorry everyone...May be for you all its basic question, but i just stareted learning i need your help..
How to sumup sales for last selection in filter,(Ex:ABC21)
here i want show when i select Year:ABC21 need my result in graph 175.Thank you all
Thank you all
- Anonymous6 years ago
Hi sprao ,
Use below steps to achieve this,
Measure:SUM_Sales = IF(SELECTEDVALUE('Table'[Year])="ABC1",CALCULATE(SUM('Sample'[Sales]),ALL('Sample'[Year])),CALCULATE(SUM('Sample'[Sales]),USERELATIONSHIP('Sample'[Year],'Table'[Year])))
Inactive Relation:ABC1:
For 2020:
Best Regards,Mail2inba4
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 Replies
- AnonymousNot applicable
Hi sprao ,
Use below steps to achieve this,
Measure:SUM_Sales = IF(SELECTEDVALUE('Table'[Year])="ABC1",CALCULATE(SUM('Sample'[Sales]),ALL('Sample'[Year])),CALCULATE(SUM('Sample'[Sales]),USERELATIONSHIP('Sample'[Year],'Table'[Year])))
Inactive Relation:ABC1:
For 2020:
Best Regards,Mail2inba4
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. - AnonymousNot applicable
sprao - There are several options here, each with drawbacks:
- UNION a row into the table for the total - this will be problematic, because the Total will be doubled when unfiltered.
- Simply consider the lack of a filter (Grand Total) to be the value you're looking for. However, if the category only covers a certain subset of years, this won't work properly.
- If #2 doesn't work, try creating a separate column for the Year Category. Then use the new column as a filter instead of the years.
I hope this helps. If it does, please Mark as a solution.
I also appreciate Kudos.