Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I'm writing a measure to calculate the total "active" help desk cases at any point in time.
Cases are "active" between their [EntryDate] and [CloseDate] inclusive.
I want to graph this data over time in a line chart, and I want to adjust the time window using a date slicer.
I have a 'Date' table and a 'Cases' table, with [Date] 1:* [EntryDate].
Cases with an [EntryDate] outside the date window should still be counted if they are active inside the date window. I've accomplished this by using ALL('Cases') in my DAX (see below).
The problem is, I also want to filter the measure by [Dept]. I don't see how I can do this while using ALL('Cases'). How can I solve this problem?
CaseVolume =
VAR vol =
CALCULATE (
COUNT ( 'Cases'[CaseID] ),
FILTER (
ALL ( 'Cases' ),
'Cases'[EntryDate] <= MAX ( 'Date'[Date] )
&& (
'Cases'[CloseDate] >= MAX ( 'Date'[Date] )
|| ISBLANK ( 'Cases'[CloseDate] )
)
)
)
RETURN
IF ( ISBLANK ( vol ), 0, vol )
Case Table:
HI,
Please try using ALLSELECTED DAX function.
ALLSELECTED function (DAX) - DAX | Microsoft Learn
Thank you for the answer. Unfortunately, there is still an issue.
On 17th May, there were 45 active cases. Using ALLSELECTED, only 19 are counted. There are 26 missing from the total. They are filtered out by the date slicer, because the [EntryDate] is before 17th May...
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
24 | |
9 | |
7 | |
6 | |
6 |
User | Count |
---|---|
29 | |
11 | |
11 | |
10 | |
6 |