Forum Discussion
Zoran05
2 years agoFrequent Visitor
Previous latest available Date
Hi community, I'm using the following formula to get the previous Day Price. The problem is that on a weekend or holiday I don't have a price. So on a Monday the calculation returns no value. ...
- Anonymous2 years ago
Hi Zoran05
You can try the follwing measure.
Sample table.
Prev Day Price = VAR a = MAXX ( FILTER ( ALLSELECTED ( 'Date Lookup'[Datum] ), [Datum] < MAX ( 'Date Lookup'[Datum] ) && [Current Price] <> BLANK () ), [Datum] ) RETURN IF ( [Current Price] <> BLANK (), CALCULATE ( [Current Price], 'Date Lookup'[Datum] = a ) )Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
2 years agoNot applicable
Hi Zoran05
You can try the follwing measure.
Sample table.
Prev Day Price =
VAR a =
MAXX (
FILTER (
ALLSELECTED ( 'Date Lookup'[Datum] ),
[Datum] < MAX ( 'Date Lookup'[Datum] )
&& [Current Price] <> BLANK ()
),
[Datum]
)
RETURN
IF (
[Current Price] <> BLANK (),
CALCULATE ( [Current Price], 'Date Lookup'[Datum] = a )
)
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Zoran05
2 years agoFrequent Visitor
Hi Anonymous ,
Many thanks for your fast reply and help :). It's working exactly as I was hoping.
Thank you so much 🙂
Best regards
Zoran