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
sandeepk66
Advocate I
Advocate I

Totals by Location in Power BI Desktop DAX

Hi, Can we Group by Totals by Location for Total Cost Column in  Power BI Desktop, Pleasee find the examples below.

 

Here is the Report:

Sales ID

Total Cost

Location

303

1200

NY

202

500

Chicago

102

700

Trenton

103

450

Philadelphia

231

555

Santa Clara

 

And I want the output like:

Sale ID

Total Cost

Location

102

700

Trenton

202

500

Chicago

 

1300

 

103

450

Philadelphia

 

450

 

303

1200

NY

 

1200

 

231

555

Santa Clara

 

555

 

 

3 REPLIES 3
sandeepk66
Advocate I
Advocate I

dont have anyu state, It should be Totals by Location.

Please the output shuould be:

Sale ID

Total Cost

Location

102

700

Trenton

202

500

Trenton

 

1300

 

103

450

Philadelphia

 

450

 

303

1200

NY

 

1200

 

231

555

Santa Clara

 

555

 

 

 

HI @sandeepk66,

 

If you add your location first and then you ID then you should get by location.

 

Not sure if that is what you need.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



MFelix
Super User
Super User

Hi @sandeepk66,

 

Don't know if I understood your (not form the US) but believe that you need to have your cities by state or I'm incorrect?

 

If you have a State column use it on your matrix visual and then hide it, if not do a group by state (sorry if the states are incorrect on my image) and then add it to a matrix visual you can then format the visual to show how you made it below.

 

Groups.pngRows.png

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



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.