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
JimN
Advocate I
Advocate I

How to dynamically set the Parameter Current Value?

Under Manage Parameter, when i use Suggested Values as Query, is there a way to set the Current Value to one of the item in the query result?

 

Example: if my query result is a list of dates, i would like to set the latest date as default and have my report use that when i first open the report.

1 ACCEPTED SOLUTION
ImkeF
Community Champion
Community Champion

As it looks, we cannot use dynamic values in parameters right now: https://community.powerbi.com/t5/Desktop/Options-to-have-report-parameters-similar-to-what-we-have-i...

 

So the option I see for you would be to add a column to your calendar-table where only for the current day, a fixed expression/value like "Today" will be returned. You could then "hardcode" that in your parameter.

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

View solution in original post

8 REPLIES 8
ryanbott
Frequent Visitor

@Anonymous , @Mmahachi 

 

I found a very helpful video by GuyInACube on Youtube about updating parameters via a REST call from PowerShell. 

 

https://www.youtube.com/watch?v=MJVSu47iMmo

Anonymous
Not applicable

Hello, resurrecting this one - I'm trying to do the same (fill in localnow as the current value by default, but can be overridden in Service if needed). Any new features that can allow this? Thanks in advance!

Anonymous
Not applicable

@JimN @ImkeF 

Appreciate assistance with the syntax.

I have my date table and added the current day column as a new column

isToday = IF('Date'[Date] = TODAY(), "TODAY", "")

How should I use it in the parameter management form?

Cheers!

ImkeF
Community Champion
Community Champion

This is a DAX formula that cannot reference parameters.

What exactly are you trying to accomplish?

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Anonymous
Not applicable

Hey @ImkeF 
I want to set the current/default value in a parameter to today.

2019-06-11 14_22_20-papercut - Remote Desktop Connection.png

 

Thanks!

did you get the solution for this - i'm trying to do the exact same thing. I put in the power query formulas for bringing back today's date but it's not extracting the date as the parameter, the parameter just shows the formula.

 

date.from(datetime.localnow())

Anonymous
Not applicable

@Mmahachi 

Unfortunately, I did not figure this out yet.

Let me know if you found a solution.

Cheers!
A

ImkeF
Community Champion
Community Champion

As it looks, we cannot use dynamic values in parameters right now: https://community.powerbi.com/t5/Desktop/Options-to-have-report-parameters-similar-to-what-we-have-i...

 

So the option I see for you would be to add a column to your calendar-table where only for the current day, a fixed expression/value like "Today" will be returned. You could then "hardcode" that in your parameter.

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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 community update carousel

Fabric Community Update - June 2025

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