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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
lukeLiu
Regular Visitor

Measure that only calculates when logical condition is met and otherwise returns blank

Greetings,

 

I have a very simple question, but have had difficulty framing the search terms. Any guidance would be appreciated!

 

In creating a measure, I have a simple logical test on the value of a field - e.g. [Status]. I'd like to write it so that if [Status] does not equal "Approved" return blank, but otherwise start a more tedious calculation with multiple variables. Is there a way to do this to make the measure more efficient?

 

Thank you.

1 ACCEPTED SOLUTION
ajohnso2
Resolver IV
Resolver IV

New Measure =

VAR _Check = MAX('Table'[Status])

 

RETURN

SWITCH(

TRUE(),

_Check <> "Approved", BLANK(),

<Do Something Else>

)

View solution in original post

2 REPLIES 2
ajohnso2
Resolver IV
Resolver IV

New Measure =

VAR _Check = MAX('Table'[Status])

 

RETURN

SWITCH(

TRUE(),

_Check <> "Approved", BLANK(),

<Do Something Else>

)

Awesome, thanks!

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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