cancel
Showing results for
Did you mean:
Helper I

## Show last data label only on a line chart

Hello,

I have a table and in the column "LatestPrice" I need to show a price only for the last day of the given period. Now all the prices are shown.

What I have done:

1) Created a measure using Lastdate function to determine the last date of the given period.

LastDate = LASTDATE('Brent&₽/\$'[Date])

2) Created a measure to determine the latest price (the price of the last day)

LatestPrice = CALCULATE(AVERAGE('Brent&₽/\$'[Brent price]),FILTER('Brent&₽/\$','Brent&₽/\$'[Date]=[LastDate]))

Somehow it shows all the prices but not the price only for the last day of the period.

Please tell me where the mistake is. Thank you!
1 ACCEPTED SOLUTION
Super User

@OlegV LastDate = MAXX(ALL('Brent&₽/\$'),[Date])

Check out my External Tool for Power BI Desktop! Microsoft Hates Greg's Quick Measures
Check out my latest book!

2 REPLIES 2
Helper I

@ Greg_Deckler

Thank you very much. It solved a problem.

Super User

@OlegV LastDate = MAXX(ALL('Brent&₽/\$'),[Date])

Check out my External Tool for Power BI Desktop! Microsoft Hates Greg's Quick Measures
Check out my latest book!

Announcements