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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hello,
i would like to calculate the number of customer based on customer code but exclude those customer name consist of "GOL -". May i know am i missing anything in the measurement?
Solved! Go to Solution.
You can create a DAX measure as follows:
Omni_No. of Customers =
CALCULATE(
DISTINCTCOUNT('Omni Sales Data'[Customer Code]),
FILTER(
ALL('Omni Sales Data'),
LEFT('Omni Sales Data'[Customer Name] , 3) <> "GOL"
)
)This measure calculates the distinct customer code, excluding customers with "GOL" prefix. Here is the solution screenshot:
As you can see, I have total 6 disticnt customers (ID is unique), but, 4 customers without the "GOL" prefix (as expected). Let me know if this solved your issue.
Best Regards,
Udit
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudo 👍
🚀 Let's Connect: LinkedIn || YouTube || Medium || GitHub
✨ Visit My Linktree: LinkTree
You can create a DAX measure as follows:
Omni_No. of Customers =
CALCULATE(
DISTINCTCOUNT('Omni Sales Data'[Customer Code]),
FILTER(
ALL('Omni Sales Data'),
LEFT('Omni Sales Data'[Customer Name] , 3) <> "GOL"
)
)This measure calculates the distinct customer code, excluding customers with "GOL" prefix. Here is the solution screenshot:
As you can see, I have total 6 disticnt customers (ID is unique), but, 4 customers without the "GOL" prefix (as expected). Let me know if this solved your issue.
Best Regards,
Udit
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudo 👍
🚀 Let's Connect: LinkedIn || YouTube || Medium || GitHub
✨ Visit My Linktree: LinkTree
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 7 | |
| 7 | |
| 6 |