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

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
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.