Forum Discussion
How come it is aggregating?
- 9 years ago
Nb Info Requests = CALCULATE ( [Nb Requests]; FILTER ( '311_Details'; '311_Details'[Nature] = "Information" ) ) Nb Service Requests = CALCULATE ( [Nb Requests]; FILTER ( '311_Details'; '311_Details'[Nature] <> "Information" ) )The way you had originally written these they had an implied ALL function
FILTER ( ALL ( '311_Details'[Nature] )... => therefore ignoring any existing filter context!
http://www.sqlbi.com/articles/filter-arguments-in-calculate/
sorry about that.
I just applied that simplification but as expected it does not make a difference.
How do I get NB DDI to show 0 on all lines except information?
Nb Info Requests =
CALCULATE (
[Nb Requests];
FILTER ( '311_Details'; '311_Details'[Nature] = "Information" )
)
Nb Service Requests =
CALCULATE (
[Nb Requests];
FILTER ( '311_Details'; '311_Details'[Nature] <> "Information" )
)
The way you had originally written these they had an implied ALL function
FILTER ( ALL ( '311_Details'[Nature] )... => therefore ignoring any existing filter context!
http://www.sqlbi.com/articles/filter-arguments-in-calculate/
- osinquinvdm9 years agoAdvocate II
Thank you so much.
I had no idea that not using an explicit FILTER() function would actually result in using an implicit ALL() function.
The small tweak you recommended made all the difference.
Thanks again !