Forum Discussion
Dynamic measure based on selection slicer
- 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
Pallavi_m , You can use Matrix and use Month Year on the column.
https://docs.microsoft.com/en-us/power-bi/visuals/desktop-matrix-visual
- Pallavi_m3 years agoHelper I
Hi amitchandak . Thanks for the quick reply.Could you eloborate more.
Requirement: measure has to be created on the slicer selection.
Measure returns just the monthyear column value i.e., if jan 2022 is selected in the slicer, then measure has to return jan2022.
Hope I'm clear.
- v-yueyunzh-msft3 years agoCommunity Support
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