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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
bchager6
Super User
Super User

Date Hierarchies and Slicers

Hi everyone...

 

I am using the below measure in the "Usage Period" visualization beneath it in order to dynamically display the time period associated with the quarter selected in the slicer to the left of it.

I have 2 questions I'm hoping someone can answer; why can't we use "between" slicers (as opposed to dropdowns, lists, etc.) with date hierarchies and why doesn't the below measure work with a "between" slicer containing a date without a hierarchy?

 

Kudos to anyone who can explain this one!

 

Capture.JPG

 

 

 

 

 

 

1 ACCEPTED SOLUTION
v-robertq-msft
Community Support
Community Support

Hi, @bchager6 

According to your description and sample picture, it seems like you want to make a date Slicer with the “Between” type and make a card chart to display the date period at the same time, you can try my steps:

This is my data calendar table:

Calendar =

CALENDAR(DATE(2019,1,1),DATE(2023,12,31 ))

v-robertq-msft_0-1613986311654.png

 

I created a measure like this:

Usage Period =

var _mindate=MINX(ALLSELECTED('Calendar'),[Date])

var _maxdate=MAXX(ALLSELECTED('Calendar'),[Date])

return

"Usage Period: "&_mindate&" to "&_maxdate

And I created a Slicer with between type and a card chart like this:

v-robertq-msft_1-1613986311669.png

 

You can download my test pbix file here

 

If this result is not what you want, you can post some sample data(without sensitive data) and your expected result so that we can help you in advance.

How to Get Your Question Answered Quickly 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

3 REPLIES 3
v-robertq-msft
Community Support
Community Support

Hi, @bchager6 

According to your description and sample picture, it seems like you want to make a date Slicer with the “Between” type and make a card chart to display the date period at the same time, you can try my steps:

This is my data calendar table:

Calendar =

CALENDAR(DATE(2019,1,1),DATE(2023,12,31 ))

v-robertq-msft_0-1613986311654.png

 

I created a measure like this:

Usage Period =

var _mindate=MINX(ALLSELECTED('Calendar'),[Date])

var _maxdate=MAXX(ALLSELECTED('Calendar'),[Date])

return

"Usage Period: "&_mindate&" to "&_maxdate

And I created a Slicer with between type and a card chart like this:

v-robertq-msft_1-1613986311669.png

 

You can download my test pbix file here

 

If this result is not what you want, you can post some sample data(without sensitive data) and your expected result so that we can help you in advance.

How to Get Your Question Answered Quickly 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

Thank you @v-robertq-msft . I think this is as close as we can get to a solution. The goal was to be able to use quarters in a horizontal slicer or timeline visualization and have the measure interact with a card, but this only seems possible with a vertical slicer.

amitchandak
Super User
Super User

@bchager6 , Hope I got your questions correctly. 

For Date with Hierarchy, You have both options, Option 1 where you use hierarchy and you have hierarchy slicer.

Right-click on the date in the visual pane. and use as the date you get between the range.

 

Date without Hierarchy do not have .day , .date. .quarter, so this formula will not work.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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