Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Solved! Go to Solution.
Hi , @Anonymous
There are some minor errors in format.
The table name is recommended to be enclosed in quotation marks, and the values "A", "B", "C" only need to be enclosed in quotation.
colummn =
IF (
( 'Table'[TERMS] = "A"
&& 'Table'[Mat] IN { "X" } )
|| (
'Table'[TERMS] = "B"
&& CONTAINSSTRING ( 'Table'[Mat], "XE" )
),
"C",
'Table'[TERMS]
)
PS:You can check whether there is an error in the sentence through this website, but the specific error still has to be debugged by yourself
http://www.daxformatter.com/
Best Regards,
Community Support Team _ Eason
Hi , @Anonymous
There are some minor errors in format.
The table name is recommended to be enclosed in quotation marks, and the values "A", "B", "C" only need to be enclosed in quotation.
colummn =
IF (
( 'Table'[TERMS] = "A"
&& 'Table'[Mat] IN { "X" } )
|| (
'Table'[TERMS] = "B"
&& CONTAINSSTRING ( 'Table'[Mat], "XE" )
),
"C",
'Table'[TERMS]
)
PS:You can check whether there is an error in the sentence through this website, but the specific error still has to be debugged by yourself
http://www.daxformatter.com/
Best Regards,
Community Support Team _ Eason
HI @Anonymous
Column = if(((Table[TERMS]="A" && Table[Mat]="X")||(Table[TERMS] = "B" && FIND("XE",Table[Mat])>0),
C,TABLE[TERMS])FiND is a better option in this scenario as CONTAiNSSTRiNG is used to match patters and we are not looking for a pattern.
Well, it looks correct. Are you facing any issue while writing that dax?
@Anonymous
why not? it looks correct but i would write it as
Column = if(
(
(Table[TERMS] = "A" && Table[Mat] = "X")
||
(Table[TERMS] = "B" && CONTAINSSTRING(Table[Mat],"XE")
),
C,
TABLE[TERMS]
)
| User | Count |
|---|---|
| 49 | |
| 37 | |
| 33 | |
| 22 | |
| 18 |
| User | Count |
|---|---|
| 132 | |
| 99 | |
| 56 | |
| 37 | |
| 37 |