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.
I have the following set up:
For each date, I have a Name followed by Departure and Arrival (times). Under each Name I have a SubName which can be null.
What I need to find is: for each date, for each name, find the first Departure (time) within the SubName. Possibly both considering Null-values and not considering Null-values.
Similarly for the last Arrival (time).
So somehow, a group by issue in SQL terms.
I have tried different Filter() and Calculate() options as calculated columns or SummarizeColumns() as a measure.
But I have to admit, that my knowledge of DAX is not great enough to solve this issue currently. I cannot seem to find the correct approach in filtering etc.
Any help would be appreciated.
My thinking is: I need to come up with a filtering that filters on either (SubName or Departure >= min(Departure within Sub Name)), in order to include values from both the SubName and null values within the SubName.
I just don't know exactly how.
Hi @Uzi2019
Thanks for your answer. It is much appreciated.
Your measure is equal to what I have created in measure #Test. It gives the minimum value for each row, which is not what I need.
Below, you can see, I have tried the following calculated columns and measures. I think FirstSubTime and FirstSubTimeNotNull is pretty close. But the first does not handle SubName null-values well, and the latter only gives values for SubName <> Null.
To make matters more complicated, I am currently using decimal hours for my columns and measures (one problem at a time). And the divide by (60 * 60) is due to my values actually being stored in seconds.
Hi @andershs
Try with below measure
First= calculate(Min(Departure), Allselected(Subname, Name)
last = Calculate(max(Arrival),Allselected(Subname))
Hi @andershs
can you share the data like copy paste?? so that we can work on your data.
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.