Anonymous
9 years agoNot applicable
CALCULATE() not filtering correctly?
Consider the following query result (in the Edit Queries screen): Now here are two measures I have made on that query: This is the result: I expected to see: ...
- 9 years ago
Hi Anonymous,
To use these method or multiple conditions in filtering, please wrap them in Filter method
CALCULATE([Total Views],FILTER(Views,NOT(ISBLANK(Views[Who]))))
- 9 years ago
Hi Anonymous
Two reasons I believe are contributing to your unexpected results:
- The empty values in the Who column are empty strings rather than null values (empty strings and nulls look the same in Data view, but are distinguishable in the Query Editor).
- CALCULATE filter arguments overwrite the filter context (by default) rather than intersecting with it.
Assuming the blank names are empty strings, this code should work:
Total authenticated views = CALCULATE ( [Total Views], Views[Who] <> "", VALUES ( Views[Who] ) )