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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I am wanting to create a custom measure for this data. I basically want to say, if EventTypeName contains Bronze... print Bronze, if EvenTypeName contains Silver - print Silver, and if EventTypeName contains Gold, print Gold.
I am not sure how to do this. Thanks in advance,
Solved! Go to Solution.
There are 2 ways using DAX:
You should create a New Column not Measure
New Column =
SWITCH( TRUE(),
SEARCH( "Bronze", Table[EventTypename],,0) <> 0 , "Bronze",
SEARCH( "Silver ", Table[EventTypename],,0) <> 0 , "Silver ",
SEARCH( "Gold ", Table[EventTypename],,0) <> 0 , "Gold",
"Other"
)
OR
New Column = =IF (CONTAINS(Table[EventTypename],"Bronze"),"Bronze",IF (CONTAINS(Table[EventTypename],"Silver "),"Silver ",IF (CONTAINS(Table[EventTypename],"Gold"),"Gold")))
There are 2 ways using DAX:
You should create a New Column not Measure
New Column =
SWITCH( TRUE(),
SEARCH( "Bronze", Table[EventTypename],,0) <> 0 , "Bronze",
SEARCH( "Silver ", Table[EventTypename],,0) <> 0 , "Silver ",
SEARCH( "Gold ", Table[EventTypename],,0) <> 0 , "Gold",
"Other"
)
OR
New Column = =IF (CONTAINS(Table[EventTypename],"Bronze"),"Bronze",IF (CONTAINS(Table[EventTypename],"Silver "),"Silver ",IF (CONTAINS(Table[EventTypename],"Gold"),"Gold")))
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!