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
jimpatel
Post Patron
Post Patron

If statement

Hi

Thanks for looking at my post.

 

I am using if statement like below, what i got stuck is, i wanted to use last if statement for anything starting with "Task*" followed by anything. But for some reason this is not working. Any idea please? 

Plus any idea of how to make case insensitive please. That is either caps or small letters i wanted to pull those data please.

 

Thanks a lot

 

IF('Work'[Column3]="Table","Working",IF('Work'[Column3]="Resign","Working",IF('Work'[Column3]="Task*","Working","Not-Working")

 

 

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @jimpatel ,

 

You want to use LEFT() i.e. IF( LEFT( Work[Column3], 4 ) = "Task"...

Dax IS case insensitive.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

5 REPLIES 5
jimpatel
Post Patron
Post Patron

Perfect 🙂

 

Thanks a lot 🙂

jimpatel
Post Patron
Post Patron

Perfect

 

Thanks a lot 

BA_Pete
Super User
Super User

Hi @jimpatel ,

 

You want to use LEFT() i.e. IF( LEFT( Work[Column3], 4 ) = "Task"...

Dax IS case insensitive.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




What if i need to do below condition please.

 

That is anything starting with any string but have "Task" anywhere in the sentences please?

 

Thanks a lot and sorry for more question

 

No problem. You would use CONTAINSSTRING(), something like this:

IF( CONTAINSSTRING( Work[Column3], "Task" ) ...

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Solution Authors