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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Anonymous
Not applicable

Using SumX like sumifs and getting totals sums

I have a data table with locations, area # and other measured data. 

Example:

LocationAreaMeasure
Location A1BK353079.809
Location A1BK352814.287
Location A1GI403743.701
Location A1GI403544.88
Location A1NL503449.787
Location A1PL503445.053
Location A1PL503435.71
Location A1PL503160.638
Location A1SW403153.577
Location B2BC713127.085
Location B2BH403063.513
Location B2BH403061.719
Location B2BH403043.09
Location B2BL402997.417
Location B2HG602936.687
Location B2HG602898.549
Location C3BC402868.828
Location C3BH502820.418
Location C3BH502651.894
Location C3BH502415.948
Location C3MU453537.022

I need to get the

1. Total Sum by Location

2. Total Sum by Location and Area

3. Percent: SumbyLocationArea / SumbyLocation

 

Summarized in Excel, this would be:

Total by Location   Total by Location & Area Calculation 
29827.44 Location A1BK355894.09619.76%
  Location A1GI407288.5824.44%
  Location A1NL503449.78711.57%
  Location A1PL5010041.433.66%
  Location A1SW403153.57710.57%
21128.06 Location B2BC713127.08510.48%
  Location B2BH409168.32230.74%
  Location B2BL402997.41710.05%
  Location B2HG605835.23519.56%
14294.11 Location C3BC402868.8289.62%
  Location C3BH507888.2626.45%
  Location C3MU453537.02211.86%

 

1 ACCEPTED SOLUTION
sevenhills
Super User
Super User

Your output seems to be wrong in the percentage column ...

Sum per Location = CALCULATE( sum(Table1[Measure]) , ALLEXCEPT(Table1, Table1[Location]))
% within Location = sum(Table1[Measure])
/ CALCULATE( sum(Table1[Measure]) , ALLEXCEPT(Table1, Table1[Location]))

 

sevenhills_0-1669842133934.png

 

View solution in original post

1 REPLY 1
sevenhills
Super User
Super User

Your output seems to be wrong in the percentage column ...

Sum per Location = CALCULATE( sum(Table1[Measure]) , ALLEXCEPT(Table1, Table1[Location]))
% within Location = sum(Table1[Measure])
/ CALCULATE( sum(Table1[Measure]) , ALLEXCEPT(Table1, Table1[Location]))

 

sevenhills_0-1669842133934.png

 

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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