Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Let's say I have this type of data:
I would like to get the count of events where the date is overdue. Let's assume that today's date is 2020-11-10, and all dates older than 10 days are considered overdue, so in this example that would be only vehicle #2. I have tried a measure like this:
Overdue count =
VAR maxDate = CALCULATE(
MAX(Events[date]),
ALLEXCEPT(Events, Events[event_id])
)
RETURN COUNTROWS(
FILTER(
Events,
Events[date] = maxDate && DATEDIFF(maxDate, NOW(), DAY) > 10
)
)
But it doesn't seem to show the proper value, instead it's blank.
Solved! Go to Solution.
@JKoivu , Try a measure like
countx(filter(summarize(Table, Table[event_id], "_1", count(Table[event_id]), "_2", calculate(count(Table[event_id]), filter(Table, Table[Date]<today()-10))), [_1]<> [_2]),[event_id])
@JKoivu , Try a measure like
countx(filter(summarize(Table, Table[event_id], "_1", count(Table[event_id]), "_2", calculate(count(Table[event_id]), filter(Table, Table[Date]<today()-10))), [_1]<> [_2]),[event_id])
Thank you @amitchandak this really helped me! Though I had to change the [_1]<>[_2] to [_1] = [_2] in my case.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
99 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
110 | |
91 | |
84 | |
66 |