Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi all,
I am struggling to calculate an aggregated KPI displayed in a matrix.
Let's say I have a dim country table related to a fact sales table :
Country table:
Sales table :
My sales are calculated by month and country/city.
I want to display on a matrix the sales total regardless of the month by country/city and month.
I used this measure :
However, the result is :
But I want to obtain this :
Any idea why it is not working ?
Thank you in advance for your help !
Regards,
Alice
Solved! Go to Solution.
use this modified version of the code :
Total_Sales_Per_Country = calculate(sum('Sales'[Sales]), removefilters(sales[Month]) )
or
Total_Sales_Per_Country = calculate(sum('Sales'[Sales]), all(Sales) , values(sales[FK]))
let me know if this helps .
If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution ✅
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠
use this modified version of the code :
Total_Sales_Per_Country = calculate(sum('Sales'[Sales]), removefilters(sales[Month]) )
or
Total_Sales_Per_Country = calculate(sum('Sales'[Sales]), all(Sales) , values(sales[FK]))
let me know if this helps .
If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution ✅
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠
Thank you for your answer, it worked !
Any idea why it doesn't work if I filter my sales by antoher column from the same table, like
Total_Sales_Per_Country = calculate(sum('Sales'[Sales]),'Sales'[Category]="XXX", removefilters(sales[Month]) )
?
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
85 | |
85 | |
69 | |
67 | |
63 |
User | Count |
---|---|
213 | |
124 | |
117 | |
81 | |
75 |