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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Budfudder
Helper IV
Helper IV

Get Dates From Date Slicer

I'm trying to get the dates which are set on a Date slicer, but I'm having problems.

 

My data table consists of various items, each with a date. But the dates are scattered widely - there might be an item with a date of 1/1/70, and the next item (chronologically) might be 1/1/75.

 

The problem is that all the methods I've tried return not the date selected in the slicer, but the earliest entry in the table that fits into the slicer range.

 

For example, using the two dates above, if I set the earliest date on the slicer to 1/1/73 and then use:

 

StartDate = CALCULATE(MIN(Table[Date Field]), ALLSELECTED(Table[Date Field]) )
or just
StartDate = MIN(Table[Date Field])
 
the value I get is not 1/1/73 but 1/1/75 - the date of the earliest row in the table that fits into the slicer. I want to get the first date of the slicer itself. Is this possible?
2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi @Budfudder,

 

I think you need to confirm there not contain any available fielder on your date fields, otherwise it will also affect allselected functions.

 

AFAIK, power bi use 'and' logic to apply multiple filters on datasource. So if you have two filter effects: 'large than 1/1/73' and 'larger than 1/1/75', it will combine these filters to get 'larger than 1/1/75 results'.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

But I do not have two filters - just one. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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