Forum Discussion
Anonymous
4 years agoNot applicable
DISTINCTCOUNT
Hi Can someone help me understand the result in the lowest visual? Why does the Tbl[Name] rows not form Filter context to make [#Name with M] zero on all other lines than the two starting with "M"?...
- 4 years ago
All you need to do is change your boolean expression to filter table.
Calculate(
distinctcount('Tbl'[name[),
filter('Tbl'[Name],LEFT ( Tbl[Name], 1 ) = "M")
)
vapid128
Solution Specialist
4 years agohttps://docs.microsoft.com/en-ca/dax/best-practices/dax-avoid-avoid-filter-as-filter-argument
"Here's an improved measure definition, which uses a Boolean expression instead of the table expression. The KEEPFILTERS DAX function ensures any existing filters applied to the Color column are preserved, and not overwritten."