Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Dynamic Titles

Hi everyone,   I am hoping to lean on your expertise.    My client wants a dynamic title.    In the filter pane they have two filters, but can only select one at a time. The first filter is a l...
  • v-juanli-msft's avatar
    6 years ago

    Hi Anonymous 

    Create a date table

    date1 =
    ADDCOLUMNS (
        CALENDAR ( DATE ( 2019, 1, 1 ), DATE ( 2020, 6, 30 ) ),
        "year-month", FORMAT ( [Date], "yyyy-mm" ),
        "monthname", FORMAT ( [Date], "Mmm" ),
        "allmonthnamne", FORMAT ( [Date], "Mmmm" ),
        "weeknum", WEEKNUM ( [Date], 2 )
    )
    

    Add columns into slicer

    Create measures and the measure into a slicer

    Measure =
    IF (
        ISFILTERED ( date1[monthname] ),
        "In " & SELECTEDVALUE ( date1[allmonthnamne] ) & " there have 20 items created",
        IF (
            ISFILTERED ( date1[weeknum] ),
            "In Week " & SELECTEDVALUE ( date1[weeknum] ) & " there have 20 items created",
            "YTD there have 20 items created"
        )
    )
    

    Best Regards
    Maggie
    Community Support Team _ Maggie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.