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
a68tbird
Resolver II
Resolver II

PBI Paginated Reports / Parameter Help

Hello All -

  Question regarding PBI paginated reports. I've just discovered that this is available, and want to move my Telerik reports over to this service.  The UI is very similar, as is the syntax in most cases.  But I can't seem to get this scenario to work. Hopefully somone here has some suggestions. 

I have reports that will either pull the previous month of sales data, or the previous quarter, depending on the selection the user makes from a simple drop down.  If Month is selected, then StartDate and EndDate are populated with the appropriate dates, and similarly if Quarter is selected, the relevant dates are populated. The calculation of these dates are all in a DateCalculations table with some simple SQL statements.  This all works in my Telerik reports, so I tried recreating in PBI. I've attached a sample RDL here that is just the parameters - no sales data or anything.  (You'll need to make your own SQL connection so that the DateCalculations table validates).  All of the parameters work except for StartDate and EndDate.  These are logical expressions such as:

 

=IIF(Parameters!QuarterOrMonth.Value = 0,
Parameters!PreviousMonthStart.Value,
Parameters!PreviousQuarterStart.Value)

When I run the report, and select Month or Quarter from the dropdown, I get an error:

 

The ValidValue expression for the report parameter 'StartDate' contains an error: The expression references the parameter 'PreviousMonthStart', which does not exist in the Parameters collection. Letters in the names of parameters must use the correct case.
----------------------------
An error occurred during local report processing.

 

I don't understand this, as that parameter, "PreviousMonthStart" does indeed exist in the parameters collection.  Can anyone help with this?

 

Thanks very much.

 

 

DateCalculations.RDL 

1 ACCEPTED SOLUTION
v-rongtiep-msft
Community Support
Community Support

Hi @a68tbird,

There are actually 2 types of parameters in paginated reports. There are "Report level parameters" and there are "Query level parameters". Normally when you create a parameter in your data set the designer creates a matching report level parameter and links the query parameter with the report parameter. Did you delete some part of the parameters?

 

I have also found some similar post, please refer to them to see if them help you.

The Value expression for the query parameter...which does not exist in the Parameters collection 

  • If two Datasets need the same Parameter, and one of them depends on the output of the other, the Parameter that they have in common has to be listed at the top of the Parameter list.

The expression references the parameter , which does not exist in the Parameters collection. (rsRunt...

  • Actually the parameter Year is dependent on the value of Dataset-2 and the dataset calculates its values using parameter PersonnelNumber, so indirectly parameter Year is dependent on parameter PersonnelNumber.

Best Regards

Community Support Team _ Polly

 

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

View solution in original post

1 REPLY 1
v-rongtiep-msft
Community Support
Community Support

Hi @a68tbird,

There are actually 2 types of parameters in paginated reports. There are "Report level parameters" and there are "Query level parameters". Normally when you create a parameter in your data set the designer creates a matching report level parameter and links the query parameter with the report parameter. Did you delete some part of the parameters?

 

I have also found some similar post, please refer to them to see if them help you.

The Value expression for the query parameter...which does not exist in the Parameters collection 

  • If two Datasets need the same Parameter, and one of them depends on the output of the other, the Parameter that they have in common has to be listed at the top of the Parameter list.

The expression references the parameter , which does not exist in the Parameters collection. (rsRunt...

  • Actually the parameter Year is dependent on the value of Dataset-2 and the dataset calculates its values using parameter PersonnelNumber, so indirectly parameter Year is dependent on parameter PersonnelNumber.

Best Regards

Community Support Team _ Polly

 

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

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.