Forum Discussion
Learner_SG
4 years agoHelper IV
Filter Function &&& in DAX
Hi , I want to use the filter function based on multiple columns and select the data.
To be specific, I need to calculate the occupancy count for TODAY and also the filter out MALE from object.name
I have used the below function ,somehow it is not giving the desired result.It just counts 2 which does not change.Could help?
| Date | object.name | Usage_Status |
| 25/2/2022 | WC Glass Flush Valve F_03 | 1 |
| 25/2/2022 | WC Glass Flush Valve F_02 | 1 |
| 25/2/2022 | WC Glass Flush Valve F_01 | 1 |
| 25/2/2022 | WC Glass Flush Valve M_02 | 1 |
Based on the above table , I expect to get 1 with my expression but gives 2 .
Male_toilet_occupancy_count =
CALCULATE (SUM( measurement[Usage_status] ),
FILTER ( 'measurement',measurement[objects.name] in{ "WC Glass Flush Valve M_01","WC Glass Flush Valve M_02"} && measurement[Date]=Today() )).
where shoud I correct it?
2 Replies
- amitchandakSuper User
- Learner_SGHelper IV
Thanks amitchandak . Got it correct now.