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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Rudyi
Helper I
Helper I

Calculating % of time above the threshold

Hello all,

can you please advise how to build a measure to calculate the % of time a value was above a threshold not binding to abosolute date values, only relative - like in last N days?

My case - I have sales data per day per salesman and a threshold of sales he should be making daily (example data)

 

John - 01.04.20 - 62K - threshold 70K

John - 02.04.20 - 72K - threshold 70K

....

John - 30.04.20 - 92K - threshold 70K

 

I need see how many days he met the threshold, e.g. in N=30 then 14/30 ~46.67%, if N=15 then 14/15 then 93.34%

 

Thanks for any hints or advice! 

 

 

1 ACCEPTED SOLUTION
Mariusz
Community Champion
Community Champion

Hi @Rudyi 

 

Please see the attached file with a solution 

 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

View solution in original post

5 REPLIES 5
Mariusz
Community Champion
Community Champion

Hi @Rudyi 

 

Can you provide a data sample and an expected result based on this sample?

 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

Mariusz
Community Champion
Community Champion

Hi @Rudyi 

 

Please see the attached file with a solution 

 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

@Mariusz  thanks  a lot for your help!

Mariusz
Community Champion
Community Champion

Hi @Rudyi 

 

No Problem!

 

 

Best Regards,
Mariusz

Hi @Mariusz,

something like following:

PersonDateSalesThreshold
John10.04.204240
John11.04.203055
John12.04.202150
John13.04.204245
John14.04.204850
John15.04.205350
John16.04.205060
John17.04.207065
John18.04.206260
John19.04.20 60 45

Under threshold in bold, so

In last N=5 days - 1/5 = 20%

In last N=10 days - 5/10 = 50%.

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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