Forum Discussion
Hugo999
2 years agoFrequent Visitor
Show only last value in line chart?
Dears I've created a line chart in Power BI. How can I display the value of the last data point? I only want to see the value of the last data point, all other data point labels should not be shown....
- 2 years ago
Hi!
I don't know how your data is structured so you have to adjust accordingly, but basically you want to figure out the max date where there is a value and then return blank() for all values that aren't the last point.
LastValueLabel = VAR __LastDate = CALCULATE(MAX('Dates'[Date]), ALL('Dates')) RETURN IF( SELECTEDVALUE('Dates'[Date]) = __LastDate, [YourMainMeasure], BLANK() )And then add that measure as the Value on the Data Label for your series.
Good luck!
TomasAndersson
Solution Sage
2 years agoHi!
I don't know how your data is structured so you have to adjust accordingly, but basically you want to figure out the max date where there is a value and then return blank() for all values that aren't the last point.
LastValueLabel =
VAR __LastDate =
CALCULATE(MAX('Dates'[Date]), ALL('Dates'))
RETURN
IF(
SELECTEDVALUE('Dates'[Date]) = __LastDate,
[YourMainMeasure],
BLANK()
)
And then add that measure as the Value on the Data Label for your series.
Good luck!