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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Get sum of respective Region for each country

Hello,

 

I need help in writting a DAX measure to get the sum of respective region for each country

DivyaAnand_0-1680241895632.png

 

Any help is much appreciated, Thank you.

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

HI,

I am not sure how your datamodel looks like, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

I hope the below can provide some ideas on how to create a solution for your datamodel.

 

Jihwan_Kim_0-1680242665725.png

 

 

Jihwan_Kim_1-1680242826760.png

 

Tickets: = 
SUM( Data[Tickets] )

 

Tickets region total = 
CALCULATE( [Tickets:], ALL(Country[Country]) )

 

 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

2 REPLIES 2
Ahmedx
Super User
Super User

the logic of the calculation of the example will be as follows:

"=" 
 VAR _AllRegion = ВЫЧИСЛИТЬ (СУММ («Таблица» [Значение]), ВСЕ ВЫБРАННЫЕ («Таблица» [Область])
 VAR _City =SUM('Таблица'[Значение])
 ВОЗВРАЩАТЬСЯ
 РАЗДЕЛИТЬ(_Город,_ВсеРегионы) 

 

Jihwan_Kim
Super User
Super User

HI,

I am not sure how your datamodel looks like, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

I hope the below can provide some ideas on how to create a solution for your datamodel.

 

Jihwan_Kim_0-1680242665725.png

 

 

Jihwan_Kim_1-1680242826760.png

 

Tickets: = 
SUM( Data[Tickets] )

 

Tickets region total = 
CALCULATE( [Tickets:], ALL(Country[Country]) )

 

 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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