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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Vkashyap
New Member

How to pass value from slicer to query parameter and bind parameter for Date related

Employee Table:  

Vkashyap_0-1706027523344.png

 

I want to have one slicer which is some date - Now whatever value we select in slicer that should get filter below case.

1. Filter all the dates which are less then selected date 

2. Filter all the dates which are greater or equal to selected date or If update dt is blank or null

 

Two satisfied, I created query parameters follwointg below blog Architeture will be like : - 

Vkashyap_1-1706027712578.png


I tried creating a date table and binding with query paramter and used that parameter to filter Power M query advance editor mode. but it getting filtered based on defulat value of queryparameter but not working when selecting or passing any date to slicer.


Advnace editor code.: 

Vkashyap_2-1706027878952.png

Slicer table 

Vkashyap_3-1706027924683.png

Overall report UI

Vkashyap_4-1706028087007.pngVkashyap_5-1706028150482.pngVkashyap_6-1706028166431.pngVkashyap_7-1706028198557.png

 

 

 

 

 

2 REPLIES 2
Anonymous
Not applicable

Hi @Vkashyap ,

If I understand correctly, the issue is that you want to filter the dates based on the slicer selection in the Power Query Editor. Please try the following methods and check if they can solve your problem:

1.Create a new parameter by going to Manage parameters. Set the data type to Date/Time.

 

2.Connect the parameter to the M query in the Power Query Editor.

let
    SelectedDate = #"Table"[Parameter Value]{0},
    Source = ...,
    #"FilteredRows" = Table.SelectRows(Source, each [DateColumn] < SelectedDate)
in
    #"FilteredRows"

 

3.Click OK to apply the filter and click apply to close the Power Query Editor.

 

4.You can also view the following link to learn add parameters.

Dynamic M query parameters in Power BI Desktop - Power BI | Microsoft Learn

 

Looking forward to your reply.

Best Regards,

Wisdom Wu

Vkashyap
New Member

Forgot to mention

1. Apply Filter on all the createdt dates which are less then selected date 

2. Apply Filter on all the  updateddt dates which are greater or equal to selected date or If update dt is blank or null

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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