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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
MLorenzen
Frequent Visitor

Paginated Report in PBI Service - Issue With Defaulting Parameter Based On Another Parameter

Hello all,

 

I recently encountered what I believe is a behavior discrepancy between local paginated report development (using Power BI Report Builder) and report runs in the Power BI Service.

 

The issue is that in local development for paginated reports, I can hide a parameter from the user and default its value using an expression that references another parameter. However, this same behavior does not work when running the report in the Power BI Service.

 

Specifically, I found this in a report I wrote that presents the user with a single date value that the report interprets as a “start” (left-bounding) date that then informs the “end” (right-bounding) date, which is hidden from the user. The report defaults that hidden parameter to be seven days after the provided start date.

 

 

=DateAdd("d", 7, Parameters!StartDate.Value)

 

 

Locally in the Power BI Report Builder app, this works as expected when I repeatedly run the report and change that start date – the end date is always seven days afterward. However, the same exact report loses this behavior in the Power BI Service, as that hidden, calculated parameter never updates.

 

For instance, if I run the report in the Power BI Service and provide May 1st, 2022 to the start date parameter, the end date calculates that it should be May 8th, 2022. But if I run the report again in the same session with a start date of April 21st, 2022, the end date does not update and still determines that it should be May 8th, 2022. Locally, however, that hidden parameter correctly calculates to be April 28th, 2022 if I follow the same steps.

 

I’ve done some researching around on the internet and don’t see much discussion on this issue, but apologies if this is a known issue or deliberate design. It just seems like a bug to me that the same exact report behaves differently locally versus once its hosted in the Power BI Service, and speaking for myself, this has caused some confusion and made me wary of what is safe to assume with the Power BI Service.

1 ACCEPTED SOLUTION
Hariharan_R
Solution Sage
Solution Sage

Hi,

As per my understanding, the hidden parameters should work in both local and in Power BI service.

 

The Endate parameter is start date parameter +7 which you added as an expression. for the first time, it will show the correct result as you mentioned but on the same session if you change the start date then end date will not change as there is no backend process for the enddate expression. This is the default behavior.

 

We usually, depend the enddate parameter with startdate parameter values in the dataset not just the expression. If the value is coming from dataset and enddate is a casecading to startdate then it will identify the every change of startdate and dataset will trigger and update the enddate parameter.

 

I would recommend to you use dataset for enddate and pass the start date value in dataset then add 7.

Thanks

Hari

Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


My Blog :: YouTube Channel :: My Linkedin


View solution in original post

1 REPLY 1
Hariharan_R
Solution Sage
Solution Sage

Hi,

As per my understanding, the hidden parameters should work in both local and in Power BI service.

 

The Endate parameter is start date parameter +7 which you added as an expression. for the first time, it will show the correct result as you mentioned but on the same session if you change the start date then end date will not change as there is no backend process for the enddate expression. This is the default behavior.

 

We usually, depend the enddate parameter with startdate parameter values in the dataset not just the expression. If the value is coming from dataset and enddate is a casecading to startdate then it will identify the every change of startdate and dataset will trigger and update the enddate parameter.

 

I would recommend to you use dataset for enddate and pass the start date value in dataset then add 7.

Thanks

Hari

Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


My Blog :: YouTube Channel :: My Linkedin


Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors