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! Don't miss your chance! Learn more
Beginner at Power BI 🙂
Have this Issue -
Below is the query that have been using it to categorize the product type as GFT and LT (So if Product Code contains GRF,GR,GF they are tagged as GFT and otherwise LT)
Existing working Query-
Solved! Go to Solution.
Try:
Category =
SWITCH (
TRUE (),
CONTAINSSTRINGEXACT ( myp[Product Code], "GRF" ), "GFT",
CONTAINSSTRINGEXACT ( myl[Session], "GR" ), "GFT",
CONTAINSSTRINGEXACT ( myp[Product Code], "-GF" ), "GFT",
CONTAINSSTRINGEXACT ( myp[Product Code], "TG" ), "GFT",
CONTAINSSTRINGEXACT ( myp[Product Code], "-TG" ), "GFT",
myp[Product Code] = "A54958", "GFT",
"LT"
)
Proud to be a Super User!
Paul on Linkedin.
Thanks Paul for your quick help
Try:
Category =
SWITCH (
TRUE (),
CONTAINSSTRINGEXACT ( myp[Product Code], "GRF" ), "GFT",
CONTAINSSTRINGEXACT ( myl[Session], "GR" ), "GFT",
CONTAINSSTRINGEXACT ( myp[Product Code], "-GF" ), "GFT",
CONTAINSSTRINGEXACT ( myp[Product Code], "TG" ), "GFT",
CONTAINSSTRINGEXACT ( myp[Product Code], "-TG" ), "GFT",
myp[Product Code] = "A54958", "GFT",
"LT"
)
Proud to be a Super User!
Paul on Linkedin.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 68 | |
| 59 | |
| 44 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 104 | |
| 102 | |
| 37 | |
| 26 | |
| 26 |