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
Hi everyone,
I m new to Power BI and struggling with Power BI DAX.
I'm trying to count Distinct customers having sales. It means when selecting relevant months, only customers having sales will be counted.
I used the following measure:
@LinhDO Please use this measure. In case this is not what you expected, share some dummy data along with expected result
Measure = CALCULATE(DISTINCTCOUNT('Table'[cust code]),FILTER('Table','Table'[f_value]>0))
Your syntax does not work as i expect.
You can see the raw data on this link:
https://drive.google.com/file/d/1tneUjqd7rpk9dHkcjgodw2UNtQb41Roi/view?usp=sharing
In sheet "Raw", total customers in a month, 1 customer can purchase more than 1 time. When calculating active customers in a month, I use pivot to summarize sales by cust code then count 1 if sales by cust code in a month > 0.
Hope its clear. 🙂
thx a lot!
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!
| User | Count |
|---|---|
| 11 | |
| 9 | |
| 9 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 27 | |
| 22 | |
| 19 | |
| 17 | |
| 11 |