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
Anonymous
Not applicable

If statement stops working if I switch true and false

I currently have the following statement which works:

 

Measure2 = If([Measure] <= 0,5;[Measure];"")

 

However, I want the value for 'true' to be blank, and for false to be [measure]. 

 

When I change this in my measure, it gives only blanks. And more, all values in my table are suddenly blank. 

 

I cannot see what I do wrong here though, and why it would be able to show this correctly but not when I switch the true and false.

1 ACCEPTED SOLUTION
v-caliao-msft
Employee
Employee

@Anonymous,

 

Please try the expression below.

Measure2 = If([Measure] <= 0,5,BLANK(),[Measure])

 

If the issue persists, please provide us more information about your report, so that we can make further analysis. You can upload a pbix file to Onedrive or any web storage and share the link. Do mask sensitive data before uploading.

 

Regards,

Charlie Liao

View solution in original post

3 REPLIES 3
v-caliao-msft
Employee
Employee

@Anonymous,

 

Please try the expression below.

Measure2 = If([Measure] <= 0,5,BLANK(),[Measure])

 

If the issue persists, please provide us more information about your report, so that we can make further analysis. You can upload a pbix file to Onedrive or any web storage and share the link. Do mask sensitive data before uploading.

 

Regards,

Charlie Liao

Anonymous
Not applicable

Thank you, that works for me! 🙂 

Anonymous
Not applicable

I currently have the following statement which works:

 

Measure2 = If([Measure] <= 0,5;[Measure];"")

 

However, I want the value for 'true' to be blank, and for false to be [measure]. 

 

When I change this in my measure, it gives only blanks. And more, all values in my table are suddenly blank. 

 

I cannot see what I do wrong here though, and why it would be able to show this correctly but not when I switch the true and false.

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.