Forum Discussion
Counting dimension's attribute distinct values
- 6 years ago
Hi guys,
The expanded version of Acquisti actually contains the full Fornitori table.
Therefore, if you use Acquisti as a filter argument in CALCULATE, you are filtering Fornitori too. CROSSFILTER is useless in this case. You could obtain the same performing a DISTINCTCOUNT, use CROSSFILTER avoiding the variable at all.
With that said, I would use something easier to read, like:
COUNTROWS ( SUMMARIZE ( Acquisti, Fornitori[Fornitore - Descrizione] ) )
Did not check performance, but it shouldn't be too bad, and definitely easier to read.
Yep, you're right. Looked to me that the goal was understanding what's happening underneath, and not just to make the measure work.
Anyway, good chat, this is what really matters. Apparently, there was no problem, but we had a good time discussing it π
Yes, maybe the example was misleading, but the purpose was to understand a little bit more what happens behind the curtain...
Thank you all guys!