Forum Discussion
How to cound real distinct values?
- 9 months ago
Hi jaryszek ,
I tried your approach and was able to reproduce the scenario on my end. By using your DAX expression with REMOVEFILTERS on the Date column, I was able to get the correct distinct count regardless of the selected date. This confirms that removing the date filter ensures the measure calculates the real distinct values across all dates, giving the expected output.
Please find the below attached .pbix file for your reference.
Please show your data.
I don't understand how a Date column affects the Value column.
If the problem is simply that the result should be 30 times lower, why not just divide your distinct count by 30?
Phil
Ok,
I do not want todivide it by 30.
I just want to get statement in DAX which will :
1. Select distinct all values from column
2. Count them.
Best,
Jacek
- jaryszek9 months agoSuper User
Ok i think this is the answer:
EVALUATE
ROW(
"DistinctValues",
CALCULATE(
DISTINCTCOUNT ( Dim_EA_Resource_TagKeys[Value] ),
REMOVEFILTERS ( Dim_EA_Resource_TagKeys[Date] )
)
)
so i need to get rid of date...- v-sshirivolu9 months agoCommunity Support
Hi jaryszek ,
I tried your approach and was able to reproduce the scenario on my end. By using your DAX expression with REMOVEFILTERS on the Date column, I was able to get the correct distinct count regardless of the selected date. This confirms that removing the date filter ensures the measure calculates the real distinct values across all dates, giving the expected output.
Please find the below attached .pbix file for your reference.- jaryszek9 months agoSuper User
thank you !