Forum Discussion
Create Total by subgroup+ Difference + % using the new DAX function Window
Hello guys how are you?
Here is one example of my PBI (simple one, with sales by country per day)
I'm looking forward to (using the new DAX window function):
- add a total by Continent per day
- add the difference per continent per day
- add a %
Example of the desired final result (in Excel)
Here are the:
Really appreciate
Leo
2 Replies
- Jihwan_KimSuper User
Hi,
Please check the below picture and the attached pbix file, whether it works for you.
Sales: = SUM( Tabela1[Sales] )Diff: = CALCULATE ( [Sales:], Tabela1[Group] = "Americas" ) - CALCULATE ( [Sales:], Tabela1[Group] = "Europe" )Percentage: = DIVIDE( [Diff:], CALCULATE([Sales:], Tabela1[Group] = "Americas"))- leorrnRegular Visitor
Hello Kim, ty for the fast reply. I've done something similar to what you suggested. In 2 separated visuals, etc.
The issue is that sometimes we have more Countries per Region, and the tables do not fit well.
That's why I considered using the new window function (similar to Tableau table calculations). So, independent of how many countries the table shows, the final calculations would fit well in the same table)
TYVM