Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello,
I have following issue and I don't know how to start writting Dax measure (if it is possible in DAX).
Lets say we have following data table:
ID | opened_at | closed_at |
1 | opened_date | closed_date |
2 | opened_date | opened_date |
I would like to achieve a chart with dates on X axis - let's say last 30 days that will show count of ID's that opened_date <= day(i) and closed date > day(i) - meaning I would like to have a chart that shows number of events that were not closed on specific day. I cannot create aggregates in DataBase because it is not mine and I have only RO access.
Any ideas how to start?
Solved! Go to Solution.
Try
Open cases =
VAR MaxDate =
MAX ( 'Date'[Date] )
VAR Result =
CALCULATE (
COUNTROWS ( 'Table' ),
REMOVEFILTERS ( 'Date' ),
'Table'[Start date] <= MaxDate
&& (
ISBLANK ( 'Table'[End Date] )
|| 'Table'[End date] > MaxDate
)
)
RETURN
Result
Try
Open cases =
VAR MaxDate =
MAX ( 'Date'[Date] )
VAR Result =
CALCULATE (
COUNTROWS ( 'Table' ),
REMOVEFILTERS ( 'Date' ),
'Table'[Start date] <= MaxDate
&& (
ISBLANK ( 'Table'[End Date] )
|| 'Table'[End date] > MaxDate
)
)
RETURN
Result
Thank you for the hint. Seems like I have solutions thanks to you!
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.