The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi,
I have some samples where I am trying to get the end close price values.
Please help me in creating measure to derive third last(Range end close price) column.
Solved! Go to Solution.
Hi @ghost10 ,
Try some dax code like this:
last price =
VAR _maxdate =
CALCULATE (
MAX ( 'Table'[Trade Date] ),
FILTER (
ALLSELECTED ( 'Table' ),
[based id] = SELECTEDVALUE ( 'Table'[based id] )
)
)
RETURN
CALCULATE (
MAX ( 'Table'[Range end close price] ),
FILTER (
ALLSELECTED ( 'Table' ),
[based id] = SELECTEDVALUE ( 'Table'[based id] )
&& [Trade Date] = _maxdate
)
)
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @ghost10 ,
Try some dax code like this:
last price =
VAR _maxdate =
CALCULATE (
MAX ( 'Table'[Trade Date] ),
FILTER (
ALLSELECTED ( 'Table' ),
[based id] = SELECTEDVALUE ( 'Table'[based id] )
)
)
RETURN
CALCULATE (
MAX ( 'Table'[Range end close price] ),
FILTER (
ALLSELECTED ( 'Table' ),
[based id] = SELECTEDVALUE ( 'Table'[based id] )
&& [Trade Date] = _maxdate
)
)
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
6 | |
4 | |
3 | |
2 | |
2 |
User | Count |
---|---|
9 | |
7 | |
6 | |
5 | |
4 |