Forum Discussion
JonathanGibbs
3 years agoRegular Visitor
Count of Counts
I have a 'Count of counts' DAX query. Sample table tVisits: Year Person SiteVisited 2021 A S1 2021 A S2 2021 A S1 2021 B S3 2021 C S2 2021 C ...
- 3 years ago
Greg_Deckler No, that's the point - any slicer or filter settings applied to the underlying table (tVisits) don't propagate through to the derived table (tSummary).
But I think I've found the answer myself - use multiple 'group by' clauses in the SUMMARIZE instructions, then apply the same slicers/filters to the derived table as to the source. So I can pass through the Year like this:
tSummary =
SUMMARIZE(
SUMMARIZE(
tVisits,
tVisits[Person],
tVisits[Year],
"DistinctSites",
DISTINCTCOUNT(tVisits[SiteVisited])
),
[DistinctSites],
[Year],
"CountVisitors",
DISTINCTCOUNT(tVisits[Person])
)Not sure if this is the most elegant solution, but it works..
Greg_Deckler
Community Champion
3 years agoJonathanGibbs Use a Year slicer?