Forum Discussion
How to count column
Hi everyone,
I am working counting activities per company and their opportunities. I created a table to show theh data. However, it seems the calculation is wrong.
Here is the category and I count manually:
Grand Total23
| Call | 4 |
| Emails | 10 |
| Meeting | 9 |
Here is the screenschot:
But the total shows 54 which incorrect. Hope anyone can help.
Thank you.
- Anonymous2 years ago
Hi lorenz0210 ,
I created some data:
Here are the steps you can follow:
If you have duplicates in your data that could cause this counting error situation, you might consider creating a measure:
Measure = var _table= DISTINCT('Table') return COUNTX( _table,[id])If it doesn't meet your desired outcome, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
4 Replies
- Ashish_MathurSuper User
Hi,
Share the download link of the PBI file.
- VahidDMSuper User
Hey lorenz0210
It's a common issue.
It depends on your model, calculation and visual setting.
BTW, check this blog, might be helpful:
https://www.vahiddm.com/post/why-my-measure-returns-the-wrong-totalor share sample of your data in text format or add more details to be able to test that 🙂
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
- AnonymousNot applicable
Hi lorenz0210 ,
I created some data:
Here are the steps you can follow:
If you have duplicates in your data that could cause this counting error situation, you might consider creating a measure:
Measure = var _table= DISTINCT('Table') return COUNTX( _table,[id])If it doesn't meet your desired outcome, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- saudansariHelper II
lorenz0210 You can use ID Count = Calculate(DistinctCount(Column Name(ID)))