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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Return a value if a value is between to conditions

Hi Power BI Geeks,

 

Earnings achieved  = VAR X = [Hours of work] * 0.51
VAR Y = [Hours of work]
return
IF(Y>1248,X,0)

If I use this measure everything goes on the right way, except that it still includes the hours of work below 1248 whereas sums everything. If I apply this in the visual filter it returns only the selected values. 

Additionally how do you write a dax measure where i can show to values such as if Y > 1248 en Y < 1500.?

Thank you in advance.
2 REPLIES 2
camargos88
Community Champion
Community Champion

@Anonymous ,

 

Earnings achieved  = VAR X = [Hours of work] * 0.51
VAR Y = [Hours of work]
return
IF(Y>1248,X,BLANK())


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Anonymous
Not applicable

Hello Camargos,

 

The measure you gave me does not work. Changing it into blank does only show blanks in each row but summed up it does not exclude the blank rows. 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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