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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
DL
Frequent Visitor

How to calculate percentage after filtering multiple columns?

Hi,

 

I am trying to write a DAX formula to calculate the percentage of "Responsible Team" that have days completed "35 days or less " and have "ended in period".

 

 

 

I am applying filters to the 2 columns:

 

Ended in Period    to "Ended in Period" and

Days Completed     to "35 days or less"

 

 In this instance  the percentage would be 50% (6/12)       

 

 

Responsible Team    Ended in Period    Days completed

Team 1Ended in Period35 days or less
Team 1 35 days or less
Team 1Ended in Period35 days or less
Team 1Ended in PeriodOver 35 Days
Team 1Ended in PeriodOver 35 Days
Team 1Ended in PeriodOver 35 Days
Team 1Ended in PeriodOver 35 Days
Team 1Ended in Period35 days or less
Team 1Ended in Period35 days or less
Team 1Ended in Period35 days or less
Team 1Ended in PeriodOver 35 Days
Team 1Ended in PeriodOver 35 Days
Team 1Ended in Period35 days or less

 

 

Kind regards, DL

1 ACCEPTED SOLUTION
Anonymous
Not applicable

So you only want to calculate the values if they are ended in period, correct? If that is a true assumption then this should work. My table name is Percentage2 in this example:

 

Percentage =
CALCULATE(
COUNTA(Percentage2[Responsible Team])
,Percentage2[Ended in Period] = "Ended in Period"
,Percentage2[Days Completed] = "35 Days or less"
)
/
CALCULATE(
COUNTA(Percentage2[Responsible Team])
,Percentage2[Ended in Period] = "Ended in Period"
)

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

So you only want to calculate the values if they are ended in period, correct? If that is a true assumption then this should work. My table name is Percentage2 in this example:

 

Percentage =
CALCULATE(
COUNTA(Percentage2[Responsible Team])
,Percentage2[Ended in Period] = "Ended in Period"
,Percentage2[Days Completed] = "35 Days or less"
)
/
CALCULATE(
COUNTA(Percentage2[Responsible Team])
,Percentage2[Ended in Period] = "Ended in Period"
)

DL
Frequent Visitor

That's worked - thank you so much!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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