cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
muhie New Member
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

Accepted Solutions
Moderator v-qiuyu-msft
Moderator

Re: Like function

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.
1 REPLY 1
Moderator v-qiuyu-msft
Moderator

Re: Like function

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
Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Summit Australia 2019

Summit Australia 2019

Travel to Melbourne and network with thousands of peers!

PBI Community Highlights

PBI Community Highlights

Check out what's new in the Power BI Community!

Top Ideas
Users Online
Currently online: 262 members 2,797 guests
Please welcome our newest community members: