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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.