Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
rahulnadk2025
Regular 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

 

rahulnadk2025_0-1751550777471.png

Please suggest solution.

2 ACCEPTED SOLUTIONS
bhanu_gautam
Super User
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])
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

johnt75
Super User
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] ) ) )
)

View solution in original post

2 REPLIES 2
johnt75
Super User
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] ) ) )
)
bhanu_gautam
Super User
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])
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.