Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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
Solved! Go to Solution.
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])
can you please post some sample data (you can directly copy data from excel and paste here)
Not totally sure how to do this. As this is from Power BI Desktop
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])