Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi ,
I want to create a card visual that can show YTD,QTD,MTD dynamically.I have 3 slicers for Year , Quarter and Date.I was thinking of doing it with switch but didn't found any DAX function that can help to come out of switch after 1st condition is satisfied(for Year) .It goes on to check all conditions and provide the last one that come as true.
I have tried with switch and looping nested ifs , but it is also behaving same way.
WHAT I WANT IS if i select year slicer as 2020(it should show YTD for 2020 in card), and when i move to next slicer Quarter -2 , then card visual should show QTD for 2020-Q2.
Any help on this will be appreciated.Thanks
@amitchandak @rbriga Thanks both for the quick response , Actually i don't want slicers for YTD ,QTD,MTD .I want the card to pick values automatically if i select a year slicer (YTD it should pick for that year, example 2020 YTD),and then when i move to quarter slicer(same card visual should pick QTD, example 2020 Q2 ).
so measure selection doesn't fit my requirement and calculated group , i have created , it is working fine in a matrix , but not in a card visual .Below i am attaching a snippet of want i want .(when card visual will become dynamic , i will go on to make card title dynamic as well).
If you know any other cool trick for this , will appreiate if you can share pbix file here.
And @amitchandak have subcribed your channel 🙂
@BI_Power_Guy , I think you need to measure slicer or calculation group
measure slicer
https://www.youtube.com/watch?v=b9352Vxuj-M
https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/50...
https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slic...
https://www.youtube.com/watch?v=vlnx7QUVYME
or
Calculation Groups- Measure Slicer, Measure Header Grouping, Measure to dimension conversion. Complex Table display : https://youtu.be/qMNv67P8Go0
Seconding @amitchandak , I would use a calculated group (requires Tabular Editor).
You can create calculated items for YTD, QTD, MTD, and name the field "Period".
Now, in the visual, you may put the measure you want to show, and make "Period" your single-selection slicer.