cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
alexleyva
New Member

URL date parameter for Paginated Reports

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:

rp:courtstartdate=2021-03-16

 

How can I pass today's date to the parameter in the URL?

1 ACCEPTED SOLUTION
pabeader
Helper IV
Helper IV

Could you set a default value expression of =Today() in the parameter?

View solution in original post

7 REPLIES 7
v-janeyg-msft
Community Support
Community Support

Hi, @alexleyva 

 

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 ()10 ), and then write the parameter like this: &rp:istoday=1.

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

alexleyva
New Member

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:

https://app.powerbigov.us/groups/{Blah}/rdlreports/{Blah} &rp:courthouse=-2&rp:courtcode=BUR%20&rp:courtcode=NCA%20&rp:courtstartdate=2021-03-16

 

This one does not work:

https://app.powerbigov.us/groups/{Blah}/rdlreports/{Blah} &rp:courthouse=-2&rp:courtcode=BUR%20

or

https://app.powerbigov.us/groups/{Blah}/rdlreports/{Blah} &rp:courthouse=-2&rp:courtcode=BUR%20&rp:courtstartdate=Today()

Why are you trying to send it in the URL rather then doing it in the report design?

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.

pabeader
Helper IV
Helper IV

Could you set a default value expression of =Today() in the parameter?

View solution in original post

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.

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors