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]) )
?
User | Count |
---|---|
84 | |
80 | |
72 | |
71 | |
55 |
User | Count |
---|---|
108 | |
106 | |
93 | |
85 | |
67 |