Forum Discussion
rahulnadk2025
1 year agoRegular Visitor
DAX expression to sum KPI are higher level
Hi,
I have case where user expects the sales_average to be calculated at country level only.
Region is higher level than country should be calculate this KPI but it should be simply sum of all the country within that region.
e.g. ANZ should Sum of sales average of Australia and New Zealand marked in Green.
But the KPI = Sales/Days is calculating it wrongly marked inRed
Please suggest solution.
2 Replies
- bhanu_gautam
Super User
rahulnadk2025 Create the Sales_average measure:
Sales_average = DIVIDE(SUM('Table'[Sales]), SUM('Table'[Days]))
Create the Region_Sales_average measure:
DAX
Region_Sales_average = SUMX(
VALUES('Table'[Country]),
CALCULATE([Sales_average])
) - johnt75
Super User
You need to do a SUMX over the countries, something like
Sales average = SUMX ( VALUES ( 'Table'[Country] ), CALCULATE ( DIVIDE ( SUM ( 'Table'[Sales] ), SUM ( 'Table'[Days] ) ) ) )