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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
officeiq
Helper I
Helper I

Using a relative date as a parameter in Paginated reports

I need to schedule exports of reports in excel/csv to external vendors and partners. These reports are sent at the beginning of each monthly with the prior month’s data as an excel sheet attachment to me.

 

I am using the Paginated Report feature along with the Subscription Service of Power BI Services. Currently, I am manually inserting the dates. Does anyone know a way I could set up these Paginated reports with a relative date as the parameter, say previous month; so they run automatically? This feature was available when I created similar output in Reporting Services 2012.

1 ACCEPTED SOLUTION

My solution was to create another column called Prior Month and then populate it with the Power Query function of =Date.IsInPreviousMonth([DATE FIELD]). I then use a filter/parameter where that column = Y. Not the path I thought, but it works...for now 😉

View solution in original post

5 REPLIES 5
rachaelwalker
Resolver III
Resolver III

Did you find a solution to this? I currently need the same for my paginated report. 

My solution was to create another column called Prior Month and then populate it with the Power Query function of =Date.IsInPreviousMonth([DATE FIELD]). I then use a filter/parameter where that column = Y. Not the path I thought, but it works...for now 😉

That is the path I took too. I created flags for each scenario (previous month, ytd, ftyd) then combined those values into one column (YTD | FTYD). From there I created a parameter that specifies the values Previous Month, YTD, FTYD. Then added a parameter/filter that says to filter data based on if Parameter value is found in my combined column. 😅 Lots of trial and error but I think it is working

officeiq
Helper I
Helper I

Thanks for the suggestion. That was one of my original "tries" - but it only will work if the previous month is 30 days and if I run it on the 1st of the next month 😯. I am looking for something that behaves like the Slicer Month (Calendar), but I will also look at the Expressions in Paginator that you mentioned - appreciate the advice.

Jon-Heide
Employee
Employee

You could try setting the value of the parameter to an expression. Something like: 

=DateTime.Now().AddDays(-30)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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