Forum Discussion
Anonymous
7 years agoNot applicable
DAX DISTINCTCOUNT Performance, Aggregrate vs Line Level
I have a DISTINCTCOUNT of an SK from my Fact table.
On a card, in the aggregrate, this measure is performant and populates quickly.
But in a table, at the detail level, the distinctcount measure takes more than 20 seconds. If I pull in a field from a dimension to the table, it's even worse, often causing a memory error for the visual.
- Anonymous7 years agoI figured out what was causing the measures to not be performant in a detail, table visualization: On the DISTINCTCOUNT measures...I had added a "+0" to the end of them. This allows the cards to show 0 if the count is zero for the filter context on the report. But for a table, these measures were *very* slow. Taking that "+0" out of the DAX made them performant. I'm not sure exactly *why*, but at least I figured out what was causing the difference.
2 Replies
- AnonymousNot applicableI figured out what was causing the measures to not be performant in a detail, table visualization: On the DISTINCTCOUNT measures...I had added a "+0" to the end of them. This allows the cards to show 0 if the count is zero for the filter context on the report. But for a table, these measures were *very* slow. Taking that "+0" out of the DAX made them performant. I'm not sure exactly *why*, but at least I figured out what was causing the difference.
- v-chuncz-msft
Community Support
Anonymous,
Glad to hear that. You may help accept the solution above. Your contribution is highly appreciated.