Forum Discussion
cfstout
4 years agoRegular Visitor
DAX equivalent to excel Array
Hi, I have an excel array formula that I need help in writing the DAX eqivalent. Columns Station ID Start Time End Time My formula captures the start time of next start per Station ID. Next St...
- 4 years ago
ValtteriN
4 years agoCommunity Champion
Hi,
This DAX should do what you want:
NextStart =
var curvalue = max(NextStart[Start Time])
var station = max(NextStart[Station ID])
return
CALCULATE(Min(NextStart[Start Time]),ALL(NextStart),NextStart[Start Time]>curvalue,NextStart[Station ID]=station)
End result:
The basic logic is to remove filters with ALL and keep the relevant filters with variables. You might need to add SiteID as an variable.
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
cfstout
4 years agoRegular Visitor
Hi, thanks for the response.
I am unable to get this to work... would you mind attaching the .pbix file so I can see how you created the VAR?
tks/