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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Pricey79
Helper V
Helper V

IF AND in a measure help please

Hello , I was hoping someone could help please with an IF statement I am struggling with please.

 

I have a column called ID's, in this column are ID's that start with numbers, and ID's that start with letters. 

There is another column called State which has various strings.

 

I need to create a measure that says IF the ID column record begins with a number AND the State is READY , then give me true 

AND if the ID column begins with letters AND the state is COMPLETE, then True, everything else is False.

I then want to put this measure on a visual

 

Could anyone help with this please?

 

Manh thanks in advance

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@Pricey79 

Is this what you want?

Column = 
var _CHECK=IFERROR(LEFT('Table (2)'[ID],1)*1,999)
RETURN IF(_CHECK=999 && 'Table (2)'[State]="COMPLETE" , TRUE(),if(_CHECK<>999&&'Table (2)'[State]="READY",TRUE(),FALSE()))

1.PNG





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

Proud to be a Super User!




View solution in original post

3 REPLIES 3
ryan_mayu
Super User
Super User

@Pricey79 

Is this what you want?

Column = 
var _CHECK=IFERROR(LEFT('Table (2)'[ID],1)*1,999)
RETURN IF(_CHECK=999 && 'Table (2)'[State]="COMPLETE" , TRUE(),if(_CHECK<>999&&'Table (2)'[State]="READY",TRUE(),FALSE()))

1.PNG





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

Proud to be a Super User!




@ryan_mayu exactly spot on! Thank you very much

you are welcome





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

Proud to be a Super User!




Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.