Forum Discussion

Pallavi_m's avatar
Pallavi_m
Helper I
3 years ago
Solved

Dynamic measure based on selection slicer

hi, I would need to create a dynamic title/measure. The slicer selection is on monthyear column.    If Dec2021, is selected, the title is Dec2021. If Feb2022 is selected, the title is Feb2022 an...
  • v-yueyunzh-msft's avatar
    v-yueyunzh-msft
    3 years ago

    Hi , Pallavi_m 

    According to your description, you want to "if jan 2022 is selected in the slicer, then measure has to return jan2022."

    Here are the steps you can refer to :

    (1)We can create a measure:

    Measure = var _slicer_date=SELECTEDVALUE('Table'[monthyear])
    return
    FORMAT(_slicer_date,"mmm yyyy")

    (3)Then we put the [monthyear] on the slicer visual and the measure on the card visual and we will meet your need :

    Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

     

    Best Regards,

    Aniya Zhang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly