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
prateekraina
Memorable Member
Memorable Member

Store value of From Date in Date Slicer

Hi,

 

I have a date slicer which i have kept in Between mode.

User can choose a date range by using From - To date functionality.

 

Problem Statement

Is there any way to some how store what user has selected in the From part of slicer in a measure?

In this example below, the value that should get stored is "3/5/2018"

 

Prateek RainaMarch 13.PNG

5 REPLIES 5
Anonymous
Not applicable

I created a Personal Bookmark for a particular view of the data.  However, every day when I go to use the info, it was showing a date range from the prior month.  That works OK for a while, until your date is several months old.

 

I found a solution by clicking on Personal Bookmarks, locating the name I had saved the view under (e.g., "Daily Data").  I had updated the date range for the current day.  So, when I pulled down the Personal Bookmarks, I clicked on the 3 dots to the right of my bookmark name and selected Update.  Now when I close and open this report, it defaults to the most recent date that I saved.

Anonymous
Not applicable

Been trying to figure this out for weeks as well.

v-yuta-msft
Community Support
Community Support

Hi prateekraina,

 

To achieve your requirement, you can create a measure and use DAX formula:

Measure = CALCULATE(

MIN(Table1[Date]),

ALLSELECTED(Table1[Date])

)

 

 

3.PNG

Best Regards,

Jimmy Tao

Hi @v-yuta-msft,

 

Your solution works only for the dates which are present in my dataset.

By design, the date range slicer shows data of +/- 10 Years from the date we have in our dataset.

 

Sometimes, a user picks such date which is not present in the dataset and nothing happens which is confusing.

So, i thought of capturing the selected value and show a custom message based on that.

 

Is it possible to store such date values selected by the user?

 

Prateek Raina

Anonymous
Not applicable

HI,  This deosn't work for me.  It is returning a range of dates from the First to the Last selected dates in the slicer.  

I have a slicer with the field 'Table'[Last Status Date] as the 'Field'.  I set the range of dates.

The is my Measure... 

 

CreatedCount =
VAR MinDateRng = CALCULATE(Min('Table'[Last Status Date]),ALLSELECTED('Table'[Last Status Date]))
VAR MaxDateRng = CALCULATE(Max('Table'[Last Status Date]),ALLSELECTED('Table'[Last Status Date]))
VAR CntCreated = CALCULATE(COUNTROWS('Tab;le'),filter('Table','Table'[Created]>=MinDateRng && 'Table'[Created] <=MaxDateRng )
Return MinDateRng
 
Using the CALCULATE(Min('Table'[Last Status Date]),ALLSELECTED('Table'[Last Status Date])) to set the Min Selected date returns a date range of all selected dates.  Not the First value as suggest above.   Same is true for the Max Date, this is the same date range, not the last selected date. 

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.