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
muhie
New Member

Like function

Hi there 

 

Please can someone help me with my statement. Im using a like but im getting an error on my like 

Below is my statement 

 

 

if [strSerialNumber] like '%ZF%' then [Line Total Incl]*[ZF Split]/100 else [Line Total Incl] * [All Split]\100 

 

Thanks 

Muhie 

1 ACCEPTED SOLUTION
v-qiuyu-msft
Community Support
Community Support

Hi @muhie,

 

Assume you want to use DAX, you can create a calculated column like below: 

 

Column 2 = IF(SEARCH("ZF",Table1[strSerialNumber] ,1,0),Table1[Line Total Incl]*Table1[ZF Split]/100,Table1[Line Total Incl]*Table1[All Split]/100)

 

q1.PNG


Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-qiuyu-msft
Community Support
Community Support

Hi @muhie,

 

Assume you want to use DAX, you can create a calculated column like below: 

 

Column 2 = IF(SEARCH("ZF",Table1[strSerialNumber] ,1,0),Table1[Line Total Incl]*Table1[ZF Split]/100,Table1[Line Total Incl]*Table1[All Split]/100)

 

q1.PNG


Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.