Forum Discussion
GKs
6 years agoFrequent Visitor
Calculate Purchase frequency
Hi everyone, I cannot understand why the total does not SUM correctly. In the following table I am making measurements of: Id_Name = Distinctcount (Table1 [Id_Name]) ... OK Sales Check = Distinctc...
- 6 years ago
Hi , GKs
Please check this sample file:
pbix attachedTry measure as below:
Measure = SUMX(VALUES('Table1'[Id_Name]),'Table1'[2 or more Purchas])Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
RoastedPork
6 years agoFrequent Visitor
Basically, there's a filter context on each row of your table, e.g. ID_Name = 1 is the filter context on your first row. But the issue is with the Total as there's no such filter on that.
Here you can try use HASONEVALUE to check if Id_name has single value. If it's return false, it means you are on "Total" row, which means there's no Id_name filter on that and it returns all values.
I might suggest you take a look below, which might help.