Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have requests that can be either service requests or information requests.
I have the following 3 measures to count them:
Nb Requests = CALCULATE(COUNT('311_Details'[DDS]))
Nb Service Requests = CALCULATE([Nb Requests];'311_Details'[Nature]<>"Information")
Nb Info Requests = CALCULATE([Nb Requests];'311_Details'[Nature]="Information")
How come the data now shows as aggregated, instead of getting broken down by Nature.
The only change I made is to
What coud explain such a a behaviour?
Thanks
Solved! Go to Solution.
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/
Change the 1st measure to
Nb Requests = COUNT ( '311_Details'[DDS] )
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/
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 !
User | Count |
---|---|
114 | |
73 | |
57 | |
47 | |
38 |
User | Count |
---|---|
173 | |
121 | |
58 | |
58 | |
56 |