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
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
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.

Top Kudoed Authors