Forum Discussion
Incorrect Count DAX Function -- Need help
- 3 years ago
Hi Vijay08V
Sorry for the late reply. The solution is to add a 'Years' table to the model to have all year values from the sample table and create a one-to-many relationship from 'Years' table to Sample table on Year column.
Then use 'Years' table's Year column in SELECTEDVALUE function in the measure and in the Year slicer too.
VOLUME COUNT = CALCULATE(COUNT('Sample'[Number]),'Sample'[YEAR]=SELECTEDVALUE('Years'[YEAR],YEAR(TODAY())))Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Hi Vijay08V
Sorry for the late reply. The solution is to add a 'Years' table to the model to have all year values from the sample table and create a one-to-many relationship from 'Years' table to Sample table on Year column.
Then use 'Years' table's Year column in SELECTEDVALUE function in the measure and in the Year slicer too.
VOLUME COUNT = CALCULATE(COUNT('Sample'[Number]),'Sample'[YEAR]=SELECTEDVALUE('Years'[YEAR],YEAR(TODAY())))
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
It worked. Thank you very much!