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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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
Top Kudoed Authors