Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Hugo999
Frequent Visitor

Show only last data label in a line chart

dears!

I have a line chart where i want to show only the label of the last value. This works fine in this situation:

Hugo999_0-1736781708774.png

If i de-select 2411 in the slicer the "last value" is not being shown. I would have expected that the last value is beeing shown.

Hugo999_1-1736781771856.png

 

What is the best way to accomplish this?

so far i am using a measure to display the last value:

lastval_%xy =
VAR LastIndex =
    MAXX(
        FILTER(ALL('KPI'[Monat]), NOT(ISBLANK('KPI'[Monat]))),
        'KPI'[Monat]
    )

VAR CurrentIndex = SELECTEDVALUE('KPI'[Monat])

VAR LastDAUValue =
    CALCULATE(
        MAX('KPI'[ProZ_DAU]),
        'KPI'[Monat] = LastIndex
    )

RETURN
    IF(
        CurrentIndex = LastIndex,
        LastDAUValue,
        BLANK()
    )


thank you for you assistance!



1 ACCEPTED SOLUTION
SamWiseOwl
Super User
Super User

    MAXX(
        FILTER(ALLSelected('KPI'[Monat]), NOT(ISBLANK('KPI'[Monat]))),
        'KPI'[Monat]
    )
 
All removes internal and external filters.
If you use AllSelected it will keep the slicer filter .

If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

View solution in original post

2 REPLIES 2
SamWiseOwl
Super User
Super User

    MAXX(
        FILTER(ALLSelected('KPI'[Monat]), NOT(ISBLANK('KPI'[Monat]))),
        'KPI'[Monat]
    )
 
All removes internal and external filters.
If you use AllSelected it will keep the slicer filter .

If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

thank you, this worked 🙂 😘

Hugo999_0-1736783410979.png

 

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.