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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Benchmura
Frequent Visitor

Calculating the percentage that a measure is greater than 5

Hi, I am trying to calculate what percentage of my total approved items fall over a 5 day threshold in age. 

 

The "Age" column below is a DATEDIF measure that shows the date difference between when an item was approved and todays date.

 

Benchmura_1-1675857790569.png

 

 

I would like a card that shows what percentage of the "Age" measure column falls above 5 days.


Formulas I have tried will not allow me to find the column due to it being a measure rather than a field.

 

Any help would be greatly appreciated!

 

Ben 

1 ACCEPTED SOLUTION

You may create another measure for finding the count of 'Approved' as follows:

Count Approved = Calculate(Count(PurchaseRequisitionLines[Purchase Requision No_]),FILTER(PurchaseRequisitionLines,[Staus]="Approved")

Then, to find the percentage use the following

pct = DIVIDE(TIMO Sum od Count>4, Count Approved)

View solution in original post

11 REPLIES 11
Padycosmos
Solution Sage
Solution Sage

Hope this helps:

Padycosmos_1-1675860073136.png

 

Hi @Padycosmos 

 

Can you see where I might be going wrong?

 

True result should be around 70 results > 4.

 

Mine's returning 279!

 

Benchmura_0-1675861782014.png

 

Thanks,

Ben 

Your measure apparently looks OK. If the data is not sensitive, could you please share the PBIX file?

Unfortunately although the page is fine, the dataset is sensitive i'm afraid 

Padycosmos_0-1675862336854.png

 

It's only age on the visual, true measure name and table location is as below:

 

Benchmura_0-1675862512142.png

 

You may, try this 

Age > 5 =
VAR summary = SUMMARIZE('Table','Table'[Date1],"Diff",[Age])
RETURN
COUNTX(FILTER(summary,[Diff]>5),[DIFF])

Could you please share the formula used in that measure?

 

Hi Pady, apologies for the delay - I got there in the end with a Distict count.  

 

What I now need to do is work out the Count > 4 days as a percentage of all approved items:

 

Would you know what's needed please?

 

Benchmura_0-1676287502021.png

Thanks again for all your help 

You may create another measure for finding the count of 'Approved' as follows:

Count Approved = Calculate(Count(PurchaseRequisitionLines[Purchase Requision No_]),FILTER(PurchaseRequisitionLines,[Staus]="Approved")

Then, to find the percentage use the following

pct = DIVIDE(TIMO Sum od Count>4, Count Approved)

Worked Perfectly, thank you!

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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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