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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.