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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
NilR
Post Patron
Post Patron

Select Min and Max Date range slicer value in Power Query not DAX

I have one calendar table joining to other tables. On my calendar table I have live data, and I would like to filter the table based on Slicer selection and create a column =

 List.Max(#"DateTable"[Last Day of Selected Slicer Date]))

 

 

is this possible to call in the Min amd Max of Slicer in Power query or M query?

 

Thanks!

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

Hey, @NilR

In my opinion, you cannot use the selected Slicer value in the Power query, because the Power query can only transform data from the data source and has no link to the visuals created in the report. The selected Segmentation value can only affect the value of measures created in the report.

What's more, if you want to filter a table to Max(Date) selected in the calendar slicer, you can follow my steps and find out if it's useful:

  1. I have created some data based on the date and quantity of Salses from 2018-1-1 to 2020-12-31, like this:

v-robertq-msft_0-1608172125009.png

  1. I created a Date table to use in Slicer:
Date = CALENDAR(DATE(2018,1,1),DATE(2020,12,31))
  1. I created a measure:
Sum of amount =

var _maxdate=MAX('Date'[Date])

return

CALCULATE(SUM(Sales[Amount]),FILTER('Sales',[Date]<=_maxdate ))
  1. I created a slicer to place 'Date'[Date] and a table chart and then place it like this:

v-robertq-msft_1-1608172125022.png

And I guess this is what you want.

You can download my test pbix file here

If this result is not what you want, you can publish some sample data (without sensitive data) and the expected result.

How to get answers to your question quickly

Best regards

Qin Community Support _Robert Team

If this post helps,then consider Accepting it as the solution to help other members find it faster.

View solution in original post

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

Hey, @NilR

In my opinion, you cannot use the selected Slicer value in the Power query, because the Power query can only transform data from the data source and has no link to the visuals created in the report. The selected Segmentation value can only affect the value of measures created in the report.

What's more, if you want to filter a table to Max(Date) selected in the calendar slicer, you can follow my steps and find out if it's useful:

  1. I have created some data based on the date and quantity of Salses from 2018-1-1 to 2020-12-31, like this:

v-robertq-msft_0-1608172125009.png

  1. I created a Date table to use in Slicer:
Date = CALENDAR(DATE(2018,1,1),DATE(2020,12,31))
  1. I created a measure:
Sum of amount =

var _maxdate=MAX('Date'[Date])

return

CALCULATE(SUM(Sales[Amount]),FILTER('Sales',[Date]<=_maxdate ))
  1. I created a slicer to place 'Date'[Date] and a table chart and then place it like this:

v-robertq-msft_1-1608172125022.png

And I guess this is what you want.

You can download my test pbix file here

If this result is not what you want, you can publish some sample data (without sensitive data) and the expected result.

How to get answers to your question quickly

Best regards

Qin Community Support _Robert Team

If this post helps,then consider Accepting it as the solution to help other members find it faster.

amitchandak
Super User
Super User

@NilR , Min and max of List is possible. But I doubt you can do it using slicer value. Slicer value can be used in measure not in columns

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

Thank you! How can I filter a table = to Max(Date) selected on Calandar slicer?

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors