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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
SarahBurkel
New Member

Calculate Total Percent with category and date filter

I want to calculate a total percent... something like %= count(category & Year)/count(year). so TP = 111/142 = 78%. I know what I want to calculate but I'm struggling to get there. The RespCnt is easy to find with a simple count, but how do I get TotalSurveryCnt without the use of a whole other table that you can't use to divide by.

 

This is what I have so far... I've tried Max and Maxx and both give me errors. MAXX cannot work with values of type boolean and MAX function only accepts a column reference as an argument.

TP = (CALCULATE(count('Graduate Exit Survey'[Stud_ID]),filter('Graduate Exit Survey', 'Graduate Exit Survey'[Resp_1]=MAXX('Graduate Exit Survey','Graduate Exit Survey'[Resp_1]&&'Graduate Exit Survey'[Year]=MAXX('Graduate Exit Survey','Graduate Exit Survey'[Year]))))/CALCULATE(count('Graduate Exit Survey'[Stud_ID]),filter(all('Graduate Exit Survey'),'Graduate Exit Survey'[Year]=MAXX('Graduate Exit Survey','Graduate Exit Survey'[Year]))))
 
Thanks in advance for the help. I greatly appreciate it.

SarahBurkel_0-1648161892542.png

SarahBurkel_0-1648162618724.png

 

1 REPLY 1
lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to work with. Avoid posting screenshots of your source data if possible.

Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors