Forum Discussion
Translate this Tableau calculation into a DAX Expression
Hi all,
I am having trouble translating this calcualted formula into a DAX expression:
Account Group =
if CONTAINS([Acc Level 1 Des],"Comp") then "Compensation"
//ELSEIF CONTAINS([Acc Level 2 Des],"Headcount") then "Compensation"
ELSEIF CONTAINS([Acc Level 3 Des],"Null 2") then "Null 2"
ELSEIF CONTAINS([Acc Level 1 Des],"Var") then "Variable"
ELSEIF CONTAINS([Acc Level 1 Des],"Oper") then "Operating"
else [Operating Levels (group)] END
Any help would be greatly appreciated.
Thank You!
Please try https://community.powerbi.com/t5/Desktop/DAX-FIND-or-SEARCH-part-of-a-string-in-a-column/m-p/134518
With IF and ELSE it will looke like as below
contain =if( SEARCH("Act",min(Asset[ Status ] ),,0)>0,"Activated",BLANK())Regards,
Ritesh
Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !! PL 300 Certification Series
2 Replies
- ribisht17
Super User
Please try https://community.powerbi.com/t5/Desktop/DAX-FIND-or-SEARCH-part-of-a-string-in-a-column/m-p/134518
With IF and ELSE it will looke like as below
contain =if( SEARCH("Act",min(Asset[ Status ] ),,0)>0,"Activated",BLANK())Regards,
Ritesh
Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !! PL 300 Certification Series - ribisht17
Super User
Did it help ?
Ritesh
Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !! PL 300 Certification Series