I have a report that I has a date parameter. I want to default it to today's date with the option for the user to change it to any date after it renders today's info. I can hard code a date like so:
How can I pass today's date to the parameter in the URL?
Solved! Go to Solution.
The definition of the parameter can't use the dax function such as today(). You can manually enter today's date every day, or add a istoday column to the data source,Like istoday =IF ( table[date] = TODAY (), 1, 0 ), and then write the parameter like this: &rp:istoday=1.
If it doesn’t solve your problem, please feel free to ask me.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I do have a default value expresion that gets set when I manually select a value for another parameter. If I try to add both parameters to the URL, I can only hardcode the date. Will not allow me to add something like "Today()" Here is an URL that works:
This one does not work:
The user must select a courthouse, then up to 20 departments to see the report. This can be anoying for someone that must do this every day. If I show them how to create a link with the parameters preset, they will be more inclined to accept this new concept.
If the majority of the time they are going to want todays date. Then my original idea is still valid. You can 'hard code' the date parameter to be =Today() in the report. Then if they want something different, they add that parameter to the url string. So you are making it easy for the majority of the requests and still have an option for the rest.
I did. But this parameter was the last parameter. Once I changed it to be the first parameter it worked, and I did not have to included it in the URL. I just had to include the other two parameters.
Check out new user group experience and if you are a leader please create your group!
Check out how to claim yours today!
Test your skills now with the Cloud Skills Challenge.