cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

DAX Help for a Measure - with OR & LIKE

Could any one help me to convert below SQL Statement into DAX Measure

 

SUM(Case when (E.RUM_UP_ID='10' or E.ACC_DESC like '%ABC%') then A.REVENUE else 0 End) as C_REVENUE

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User VI
Super User VI

Re: DAX Help for a Measure - with OR & LIKE

Hi @MKPBI_2805 

try smth like

SUMX(
Table,
IF (Table[RUM_UP_ID]='10' || SEARCH(Table[ACC_DESC], 'ABC') > 0, [REVENUE], 0)
)

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

2 REPLIES 2
Highlighted
Super User VI
Super User VI

Re: DAX Help for a Measure - with OR & LIKE

Hi @MKPBI_2805 

try smth like

SUMX(
Table,
IF (Table[RUM_UP_ID]='10' || SEARCH(Table[ACC_DESC], 'ABC') > 0, [REVENUE], 0)
)

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

Highlighted
Community Support
Community Support

Re: DAX Help for a Measure - with OR & LIKE

HI @MKPBI_2805,

Please take a look at below blog to know more about string comparison between T-SQL query and DAX formula:

From SQL to DAX: String Comparison 
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements

August Community Highlights

Check out a full recap of the month!

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Kudoed Authors