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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

Find out what's new and trending in the Fabric Community.