Forum Discussion
Multiple Button Bookmarks - Need Help
- 1 year ago
Hi DarshanKumar,
Thank you for reaching out to Microsoft Fabric Community.
Based on your requirement, please follow below steps:
- Create two independent tables:
PeriodSelector = DATATABLE("Period", STRING, {{"YTD"}, {"LTM"}})
MetricSelector = DATATABLE("Metric", STRING, {{"Headcount"}, {"Attrition"}})
Add these both tables to the report as slicers and format them as buttons.
- Create a new measure like below:
SelectedMetricMeasure =
VAR _Metric = SELECTEDVALUE(MetricSelector[Metric])
VAR _Period = SELECTEDVALUE(PeriodSelector[Period])
RETURN
SWITCH(
TRUE(),
_Metric = "Headcount" && _Period = "YTD", [Headcount_YTD],
_Metric = "Headcount" && _Period = "LTM", [Headcount_LTM],
_Metric = "Attrition" && _Period = "YTD", [Attrition_YTD],
_Metric = "Attrition" && _Period = "LTM", [Attrition_LTM],
BLANK()
)
Use this measure in the matrix visual, the data will update automatically based on both slicer selections.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Thanks and regards,
Anjan Kumar Chippa
- Create two independent tables:
Thanks Pankaj.
But the requirement is show the matrix visual based on two filter. Ex
The matrix should show YTD headcount when we select YTD button and Headcount button.
I want to check if this possible if not I can have 4 buttons bookmarked to each visual Ex: HC YTD, HC LTM, Attriton YTD and Attriton LTM.
Regards,
Darshan
Hi DarshanKumar,
Thank you for reaching out to Microsoft Fabric Community.
Based on your requirement, please follow below steps:
- Create two independent tables:
PeriodSelector = DATATABLE("Period", STRING, {{"YTD"}, {"LTM"}})
MetricSelector = DATATABLE("Metric", STRING, {{"Headcount"}, {"Attrition"}})
Add these both tables to the report as slicers and format them as buttons.
- Create a new measure like below:
SelectedMetricMeasure =
VAR _Metric = SELECTEDVALUE(MetricSelector[Metric])
VAR _Period = SELECTEDVALUE(PeriodSelector[Period])
RETURN
SWITCH(
TRUE(),
_Metric = "Headcount" && _Period = "YTD", [Headcount_YTD],
_Metric = "Headcount" && _Period = "LTM", [Headcount_LTM],
_Metric = "Attrition" && _Period = "YTD", [Attrition_YTD],
_Metric = "Attrition" && _Period = "LTM", [Attrition_LTM],
BLANK()
)
Use this measure in the matrix visual, the data will update automatically based on both slicer selections.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Thanks and regards,
Anjan Kumar Chippa