Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
lpost
New Member

How to show selected values of date hierarchy slicer in card

I have a date hierarchy slicer on one page of my report that is synced to a second page. On the second page, I want to have a card that displays the values selected in the date hierarchy slicer. The slicer has three levels: year, quarter and month using a Policy Effective Date field below:

 

lpost_0-1628800794550.png

 

If a full year level is chosen, I want the card to display the year instead of a breakout of the levels below. For example, the card should display "2019, 2020" for the selection below:

 

lpost_1-1628801007579.png

 

But also keep the year when a certain quarter or month is chosen. The first image below should show "2019 Qtr 1" and the second one should show "2021 January":

 

lpost_2-1628801343583.png   

lpost_3-1628801386113.png

 

And be able to combine multiple selections. The below should show "2019, 2020 Qtr 1":

 

lpost_4-1628801524407.png

 

As I'm typing this I realize this may be extremely complicated and why I haven't been able to find any solutions yet. But any help is appreciated!

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @lpost ,

 

According to your description, you can use the CONCATENATEX function to achieve a similar effect. It calculates the expression for each row of the table, and then concatenates the result into a string, separated by a specified separator.

 

Take the date hierarchy as an example. If quarter is selected, all dates of day will be selected by default. You must filter manually. If there is no hierarchical structure, then any splicing can be carried out.

1 = CONCATENATEX(VALUES('calendar'[Date]),'calendar'[Date],"-")

vhenrykmstf_0-1629170704417.png

So day is selected by default:

 

vhenrykmstf_1-1629170754725.png

no hierarchy:

vhenrykmstf_2-1629170842750.png

 

Hope to help you solve the problem.


Best Regards,
Henry


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

View solution in original post

2 REPLIES 2
v-henryk-mstf
Community Support
Community Support

Hi @lpost ,

 

According to your description, you can use the CONCATENATEX function to achieve a similar effect. It calculates the expression for each row of the table, and then concatenates the result into a string, separated by a specified separator.

 

Take the date hierarchy as an example. If quarter is selected, all dates of day will be selected by default. You must filter manually. If there is no hierarchical structure, then any splicing can be carried out.

1 = CONCATENATEX(VALUES('calendar'[Date]),'calendar'[Date],"-")

vhenrykmstf_0-1629170704417.png

So day is selected by default:

 

vhenrykmstf_1-1629170754725.png

no hierarchy:

vhenrykmstf_2-1629170842750.png

 

Hope to help you solve the problem.


Best Regards,
Henry


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

amitchandak
Super User
Super User

@lpost , check if isfiltered can help you to get that

 

example = if(isfiltered([Date].month), 1, 0)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.