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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
powerbi_ex
Frequent Visitor

Slice by a Custom Column with Parameter

I created a parameter to use it in the where clause in the SQL (direct query) and bind to a column in a static table with same name called DateParam.   How to use the Past Time column in a slicer that slicers the value of its DateParm? 

 

Table

powerbi_ex_2-1747279869769.png

 

Bind Parameter

powerbi_ex_0-1747279249855.png

 

Power Query SQL

powerbi_ex_1-1747279583890.png

 

Slicer doesn't work when placing in report the way I am currenting doing it.

powerbi_ex_3-1747280547149.png

 

 

 

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @powerbi_ex  - You're on the right track with using a parameter bound to a slicer, but the issue here is that you are trying to slice using a human-readable column (Past Time) while the actual parameter value being passed to the SQL query is DateParam (which is a number like -300, -1800, etc.).In Power BI, slicers do not directly update parameters unless the slicer is placed on the parameter-bound column itself, not on a display or helper column.

In the slicer visual, drag the DateParam column (not Past Time) into the slicer.

Set the visual to “Dropdown” or “List”.

Change the display to show Past Time text, not the actual DateParam value:

Select the slicer.

Go to the Model view.

Ensure DateParam is sorted by Order (you already have that).

Create a calculated column or a disconnected table to show the labels — but ideally just change the slicer's column to Past Time, and bind the parameter manually.

However, Power BI currently doesn’t support indirect binding (i.e., clicking on Past Time to change the value of DateParam) in the slicer natively unless you’re using field parameters or what-if parameters.

 

Modelling tab>> field parametes check this..

 

Hope this helps.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

2 REPLIES 2
danextian
Super User
Super User

Hi @powerbi_ex 

Fields or numeric parameters created within the model cannot be used to filter a query. Power Query has its own parameters, which exist solely within the query editor. Changes made in the query editor influence the semantic model, but the semantic model does not directly affect the query editor





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
rajendraongole1
Super User
Super User

Hi @powerbi_ex  - You're on the right track with using a parameter bound to a slicer, but the issue here is that you are trying to slice using a human-readable column (Past Time) while the actual parameter value being passed to the SQL query is DateParam (which is a number like -300, -1800, etc.).In Power BI, slicers do not directly update parameters unless the slicer is placed on the parameter-bound column itself, not on a display or helper column.

In the slicer visual, drag the DateParam column (not Past Time) into the slicer.

Set the visual to “Dropdown” or “List”.

Change the display to show Past Time text, not the actual DateParam value:

Select the slicer.

Go to the Model view.

Ensure DateParam is sorted by Order (you already have that).

Create a calculated column or a disconnected table to show the labels — but ideally just change the slicer's column to Past Time, and bind the parameter manually.

However, Power BI currently doesn’t support indirect binding (i.e., clicking on Past Time to change the value of DateParam) in the slicer natively unless you’re using field parameters or what-if parameters.

 

Modelling tab>> field parametes check this..

 

Hope this helps.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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