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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Trying to Replicate a Total in a Measure

I am trying to create a measure that replicates the total value in this table:

PUG_0-1596562917772.png


The total fluctuates as filters are applied and I would need the measure to do the same. Ultimately I will use the measure to calculate a "Percent of Students Enrolled in Top 10 Programs" value.

For instance:
1,219 (Sum of Top 10 Program Enrollment Measure) / 2000 (Total Students) = 61%
 

Thank you in advance!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I have solved this, thank you for the input. The two measures needed: 

 

Top10 Program Total =
var A = SUMMARIZE('TE',[program],"Enrollment",SUM('TE'[
student_flag])) 

var Top10 = TOPN(10,A,[Enrollment],DESC)
RETURN
SUMX(Top10,[Enrollment])

T10P % of TE = [T10P Total]/[Total Students Distinct]

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

I have solved this, thank you for the input. The two measures needed: 

 

Top10 Program Total =
var A = SUMMARIZE('TE',[program],"Enrollment",SUM('TE'[
student_flag])) 

var Top10 = TOPN(10,A,[Enrollment],DESC)
RETURN
SUMX(Top10,[Enrollment])

T10P % of TE = [T10P Total]/[Total Students Distinct]

v-xuding-msft
Community Support
Community Support

Hi @Anonymous ,

 

You could try like this:

Measure 2 = 
var total = SUMX(ALLSELECTED('Table'[Program]), [Measure])
return
DIVIDE(total,2000)

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
Community Champion
Community Champion

@Anonymous This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
amitchandak
Super User
Super User

@Anonymous , TOPN is one option another option is Rank

example

Top 10 City Rank = CALCULATE([Sales],TOPN(10,all(Geography[City]),[Sales],DESC),VALUES(Geography[City Id]))

 

For GT

Sum(Table[total student])

or

calculate(Sum(Table[total student]) , allselected(Table))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.