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
IamTDR
Responsive Resident
Responsive Resident

Sum Column w/ Distinct Filters Help

Hello

 

I needed a bit of help suming a column by distinct filters.

 

Please see below image.

 

I would like to write a measure that totals number of students by territory and by program.  The number of students would change depending on Territory and by Program selected via my slicers.

 

So what I would like my Students column total to be is 7,780 (5,139 + 1,061 + 1,580).

 

Not having much luck using a calculated function.

 

Any ideas?

 

Thanks

 

Capture.PNG

1 ACCEPTED SOLUTION
IamTDR
Responsive Resident
Responsive Resident

I just tried this out and I am currently testing as it seems to work.

 

Measure = MAXX(DISTINCT(Table1[Country]),MAX(Table1[Weight]))
SumWeight = SUMX(DISTINCT(Table1[Country]),[Measure])

View solution in original post

3 REPLIES 3
rocky09
Solution Sage
Solution Sage

@IamTDR

can you please post some sample data (you can directly copy data from excel and paste here)

IamTDR
Responsive Resident
Responsive Resident

Not totally sure how to do this.  As this is from Power BI Desktop

IamTDR
Responsive Resident
Responsive Resident

I just tried this out and I am currently testing as it seems to work.

 

Measure = MAXX(DISTINCT(Table1[Country]),MAX(Table1[Weight]))
SumWeight = SUMX(DISTINCT(Table1[Country]),[Measure])

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.