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! Request now

Reply
kaileena
Frequent Visitor

dynamically set current date to slicer date selection

Hello, 

 

I have a slicer with Date column 

kaileena_2-1657637880128.pngkaileena_0-1657638692317.png

 

 

 

 

And I will show a snap shot of my calendar table from the query editor. I want the value of the "current date" to be what ever value i select from slicer. I want the current date to "read" what ever value i select from date slicer. Here is a snap shot from the query editor. I have copied the calendar table from another source, so i do not own it. 

kaileena_3-1657637520334.pngkaileena_4-1657637539711.png

regards,

kaileena

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @kaileena ,

 

Agree with @edhans that there is no way to pass the selection in slicer back to Power Query though.

 

 

You may create a measure to dynamically get the offset:

Offset = DATEDIFF(MAX('Table'[Date]),MAX('Dates'[Date]),MONTH)

Eyelyn9_0-1657852714987.png

 

Best Regards,
Eyelyn 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

5 REPLIES 5
Anonymous
Not applicable

Hi @kaileena ,

 

Agree with @edhans that there is no way to pass the selection in slicer back to Power Query though.

 

 

You may create a measure to dynamically get the offset:

Offset = DATEDIFF(MAX('Table'[Date]),MAX('Dates'[Date]),MONTH)

Eyelyn9_0-1657852714987.png

 

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

Hello! thank you. 

edhans
Super User
Super User

Unfortunately you cannot do this. The selected value(s) in a slicer are locked to what you had selected when you published and they cannot dynamically be changed via DAX.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Hello! I would like my query editor to "read" the value I selected in the slicer. (i need this because i have other columns that calculte the month offset. I want to calculate the month offset with respect to slicer selection)

 

I hope it is clearer. I will edit the text above.

Power Query cannot see anything in the DAX model nor in the report layer. In DAX, you can use SELECTEDVALUE() or ALLSELECTED() to see what the user has selected. There is no way to pass that back to Power Query though. Power Query to the Model is a one way street - Power Query loads data in.

An exception to that is with a direct query model, but that is only to allow PQ to create SQL code and cannot see the report layer. It just talks to the storage engine.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

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 Kudoed Authors