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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
hannaheb
New Member

Use DAX formula instead of time period parameters in custom SQL query

In a custom SQL query, time period parameters can be integrated, that can later be changed by the dashboard user and therefore the query runs in the background for this time period. Is there also a possibility to solve this via a DAX function? Basically it is about defining decils and assigning the data to those decils in relation to a time period.

3 REPLIES 3
hannaheb
New Member

Thank you for answering! The problem with Dynamic M Query Parameters is, that you can only change them in the "backend" so there is no option in the "frontend" for the dashboard viewer, right?

That's incorrect.  You can bind DAX columns to the parameter.

lbendlin
Super User
Super User

If your SQL Server is connected via Direct Query then you can use Dynamic M Query Parameters.

 

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

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors