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
Dear Community,
I want a count of customer numbers. below is the table I have now. Except customer number, all three columns are measure results.
I am attaching the expected table output. Can someone help me how to achieve it?
Attaching the sample file: https://drive.google.com/file/d/1pcNYJfbR09naSgqgQSBJlP0AyGvxe9jp/view?usp=share_link
Current Table:
Expected output:
Thanks in advance for any help
Solved! Go to Solution.
Hi @sharong
Because you are counting the number of customers based on the measurement, you cannot remove Customer No from the visual, and if you remove it, you cannot calculate the corresponding number.
The following is the measure code:
Count_customer = var a=FILTER(ALLSELECTED(Sheet1),[Payment delay persistence only short]="Customer's payment delay category got worse")
var b=FILTER(ALLSELECTED(Sheet1),[Payment delay persistence only short]="Customer didn't change payment delay category")
var c=FILTER(ALLSELECTED(Sheet1),[Payment delay persistence only short]="Customer's payment delay category improved")
return SWITCH(TRUE(),[Payment delay persistence only short]="Customer's payment delay category got worse",COUNTROWS(a),[Payment delay persistence only short]="Customer didn't change payment delay category",COUNTROWS(b),[Payment delay persistence only short]="Customer's payment delay category improved",COUNTROWS(c))
Best Regards,
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @sharong
Because you are counting the number of customers based on the measurement, you cannot remove Customer No from the visual, and if you remove it, you cannot calculate the corresponding number.
The following is the measure code:
Count_customer = var a=FILTER(ALLSELECTED(Sheet1),[Payment delay persistence only short]="Customer's payment delay category got worse")
var b=FILTER(ALLSELECTED(Sheet1),[Payment delay persistence only short]="Customer didn't change payment delay category")
var c=FILTER(ALLSELECTED(Sheet1),[Payment delay persistence only short]="Customer's payment delay category improved")
return SWITCH(TRUE(),[Payment delay persistence only short]="Customer's payment delay category got worse",COUNTROWS(a),[Payment delay persistence only short]="Customer didn't change payment delay category",COUNTROWS(b),[Payment delay persistence only short]="Customer's payment delay category improved",COUNTROWS(c))
Best Regards,
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the response @Anonymous
Just another small clarification in the same data. Is it possible to bring the "Payment delay persistence only short" into a filter or a slicer.
Hi @sharong
Measure cannot be put into slicer, maybe you can create a calculated column, then put thr column to the slicer
Best Regards,
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 |
|---|---|
| 9 | |
| 7 | |
| 6 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 18 | |
| 14 | |
| 13 |