Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
The below should be relatively easy to fix in DAX but somehow I do not succeed.
For simplicity sake here is a dummy fact table:
ID | Content | Required Column |
1 | Text1,text2text3,text4,text5 | 2plus4 |
2 | Text1 | other |
3 | Text2,Text4 | 2plus4 |
4 | Text1,text5 | 1pus5 |
5 | Text1,Text4,Text5 | 1plus5 |
6 | Text0Text2text99 | Text2 |
7 | Text 18 | Other |
I try to get a new (calculated) column that checks in the following order:
Your help is appreciated,
(Worst)Kees
Solved! Go to Solution.
@Worstkees , A new column like
Switch( True() ,
containsstring([Content],"text2") && containsstring([Content],"text2") , "2plus4",
containsstring([Content],"text1") && containsstring([Content],"text5") , "1plus5",
containsstring([Content],"text2"), "text2",
"Other")
@amitchandak thanks, this is brilliant.
Do you have any idea why "?" or "/?" is not working for my "text2" while if I use any other combination of characters, it works? No big deal (I created a workaround) but just curious.
Kind regatds & thanks again,
(Worst)Kees
@Worstkees , A new column like
Switch( True() ,
containsstring([Content],"text2") && containsstring([Content],"text2") , "2plus4",
containsstring([Content],"text1") && containsstring([Content],"text5") , "1plus5",
containsstring([Content],"text2"), "text2",
"Other")
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
21 | |
15 | |
14 | |
11 | |
7 |
User | Count |
---|---|
25 | |
24 | |
12 | |
12 | |
11 |