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 the Community,
I have to calculate a percentage of anomaly on the sales of some product.
On the file of anomaly my problem is that I have several type of anomaly on the same reference so on a reference the anomaly is counted several times.
How to make sure that if a reference is present several times, only one is counted in the calculation?
Thanks in advance
Solved! Go to Solution.
Hi @Cednok ,
In my understanding, You could create a measure by the following formula:
anomaly percentage = DISTINCTCOUNT([REF])/CALCULATE(COUNT([REF]),FILTER(ALL('Table'),[Article Type]="Sold to"))
The final output is shown below:
If it is incorrect, you could try to another measure by the following formula:
anomaly percentage2 = DISTINCTCOUNT([REF])/COUNT([REF])
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Cednok ,
In my understanding, You could create a measure by the following formula:
anomaly percentage = DISTINCTCOUNT([REF])/CALCULATE(COUNT([REF]),FILTER(ALL('Table'),[Article Type]="Sold to"))
The final output is shown below:
If it is incorrect, you could try to another measure by the following formula:
anomaly percentage2 = DISTINCTCOUNT([REF])/COUNT([REF])
The final output is shown below:
Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you very much
Thank you but these measurs will tell me how many duplicate references I have, it will not allow me to do the calculation
I may have badly expressed my need
I have to calculate a percentage of anomaly on the reference of articles but I have several anomalies on the same references.
But if several anomalies on the same reference = 1 anomaly
For example on the file I should have 8 real anomaly
For examples At the moment I have 10 articles "sold to", on the file anomaly you can see 5 anomalies but on 3 references the calculation should be 3/10 and not 5/10
How to make so that the calculation is taken into account only on the distinct references ?
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 |
|---|---|
| 58 | |
| 53 | |
| 43 | |
| 17 | |
| 16 |
| User | Count |
|---|---|
| 123 | |
| 108 | |
| 44 | |
| 32 | |
| 24 |