Forum Discussion
chris2
4 years agoRegular Visitor
[Solved] Counting rows with conditions and context
Hi! I have a list of events with an activation and inactivation date. I would like to create a measure which counts the number of active events (i.e. events where this condtion is true: ActiveDate ...
- 4 years ago
Jihwan_Kim
Super User
4 years agoHi,
Please check the below picture and the attached pbix file.
Standing_events =
COUNTROWS (
FILTER (
ALL ( eventframes ),
eventframes[ActiveDate] <= MAX ( dim_Date[Date] )
&& OR (
eventframes[InactiveDate] >= MIN ( dim_Date[Date] ),
eventframes[InactiveDate] = BLANK ()
)
)
) + 0
chris2
4 years agoRegular Visitor
This returned a count of all events. Anyway thank you for your effort.