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
Arete
Helper I
Helper I

Calculate number of months over target

I'm having a brain fart and can't figure out how to create a measure to count the months over a target. 

 

Measure that shows %: 

2022 Margin % = 
DIVIDE(
    [2022 Total Amount Converted] - [2022 Total Costs], [2022 Total Amount Converted]
)

 

I'd like to create a measure that counts months that are over 50% (.5).

1 ACCEPTED SOLUTION
vicky_
Super User
Super User

You can use a var for your DIVIDE calculation and return if > 0.5. 

Something like:

2022 Margin % = 
var counts = DIVIDE(
    [2022 Total Amount Converted] - [2022 Total Costs], [2022 Total Amount Converted]
)
return IF(counts > 0.5, counts, BLANK())

View solution in original post

2 REPLIES 2
vicky_
Super User
Super User

You can use a var for your DIVIDE calculation and return if > 0.5. 

Something like:

2022 Margin % = 
var counts = DIVIDE(
    [2022 Total Amount Converted] - [2022 Total Costs], [2022 Total Amount Converted]
)
return IF(counts > 0.5, counts, BLANK())

Thank you, very helpful!

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.