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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hello,
I'm creating a Metric. I need to use a CALCULATE formula where Im doing a DISTINCTCOUNT of a filtered table. The thing is that the filter is conformed by many different string codes "A1.01", "A1.02", "A1.03", etc.
Is there any shortcut to fetch all these variations with one line of code? Similar to Regex "A1.0%".
Metric1 = CALCULATE(DISTINCTCOUNT(Table[Column]), FilterTable[Code] = "A1.01" || FilterTable[Code] = "A1.02" || ...)
Thanks!
Solved! Go to Solution.
Could you use LEFT(FilterTable[Code], 4) and the compare it to "A1.0"?
Could you use LEFT(FilterTable[Code], 4) and the compare it to "A1.0"?
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 12 | |
| 11 | |
| 7 | |
| 7 | |
| 6 |