I have a Power BI dataset as a data source in Power BI Report Builder.
I have use DAX expression to generate the parameter as shown below:
EVALUATE SUMMARIZECOLUMNS('DimensionList'[TopLevel], 'DimensionList'[SubLevel], 'DimensionList'[Dimension], RSCustomDaxFilter(#DimensionListTopLevel,EqualToCondition,[DimensionList].[TopLevel],String), RSCustomDaxFilter(#DimensionListSubLevel,EqualToCondition,[DimensionList].[SubLevel],String), RSCustomDaxFilter(#DimensionListDimension,EqualToCondition,[DimensionList].[Dimension],String))
However, this is not cascading parameter.
How can I rewrite this to cascade from TopLevel to SubLevel and finally Dimension?
Related
How I can pass SSRS parameter with #? When I am trying to choose email from parameter list, I get:
An error has occurred during report processing. (rsProcessingAborted)
Query execution failed for dataset 'DataSet1'. (rsErrorExecutingCommand)
Parser: The syntax for '#xx' is incorrect. (ASF#xx.com).
I need it to filter my MDX dataset.
The values in cubes uses are not simply text, they are members of a dimension with attributes. In order to make the comparison, it needs to be converted to the proper syntax. A good way to add a parameter is to use the SSRS Query Designer.
Go to your Dataset properties.
Click on Query Designer.
Drag the attribute to the top-right corner.
Check the box in the Parameters column.
Click OK.
This will create a hidden dataset along with the parameter. It also formats the dropdown list for you.
If you look in the MDX it creates, there is a StrToSet function that it uses to interpret the string.
Another option that is simpler, but less efficient is to simply apply the filter to your dataset within SSRS.
Go to the Dataset properties.
Go to the Filters tab.
Add a filter that ensures the Email column equals your Parameters!Email.Value
The 3rd party application is passing the parameter values as follows: Parameters=Collapsed&Priority=P1%7cP2. It is using a %7c (which is a pipe) instead of passing the parameters the way SSRS is looking for them as follows: Parameters=Collapsed&Priority=P1&Priority=P2. The parameter is multi select in SSRS and works in Report Builder just fine. My where clause is using IN (#priority).
How can I get SSRS to use the parameter values that are being passed in the URL?
If you can't change the application to provide the correct multi-value parameter syntax (...&Priority=Value1&Priority=Value2&Priority=Value3...) you can set the value that is passed to your dataset in the Parameters section of the dataset properties to be the following expression:
=split(Parameters!Priority.Value,"|")
This will take the pipe delimited list and separate it into a list of items that can be passed to your SQL query and used with the IN function.
I have created a dummy report to demonstrate this:
Parameter
Dataset
Dataset Properties
Report Result
In an existing SSRS 2008 r2, report, I am attempting to add a parameter called 'Customer_Category'. I am getting the following error message:
The report paramter 'CustomerNumber' has a DefaultValue or a ValidVaue that depends on the report parameter 'Customer_Category'. Forward pointing dependencies are not valid.
I am trying to determine how to fix this error. The 'CustomerNumber' is a parameter value that is obtained by reading from a dataset. In this dataset there are existing other parameters called 'Customer_Type' and 'Customer_Preference'. Both of these parameters obtain there values from selections that the user makes when the SSRS report is executing. There are no default values.
I am trying to have the 'Customer_Category' be the same way where there are no default values and the user must select the parameter value when the report is executing. There should only be one value that the user can select from.
The new parameter called 'Customer_Category' is the last parameter in the list of parameters. Does the order of parameters make a difference? If so, how can I move the 'Customer_Category' parameter in front of the customer_number parameter?
Here is the sql that is used from obtaining a list of customers from the dataset for customer_number:-
SELECT Distinct CustomerNumber
FROM BridgeUserCustomer
WHERE
Type = #Customer_Type
AND Preference = #Customer_Preference
AND Category = #Customer_Category
GROUP BY CustomerNumber
Would you tell me what is wrong and what I can do to solve the problem?
Summary
The order of parameters in your IDE (Report Designer or Report Builder) matters.
If you have a hierarchy of parameters (one level dependent on the other), the top-level parameter must appear first in the parameter list.
In SSRS these are referred to as cascading parameters.
Solution
Open the Report Data tab
Expand the Parameters folder
Select a parameter and use the up/down arrows to adjust order
Report Designer
Report Builder
I am trying to show one of the two simple reports on a click event. I have three report designs in a single Dynamics SSRS reporting project. One pie and two table designs. I want to show one of the table based on the user selection on pie slice. When I try to add conditional function for report action on the pie series I get compile time error stating that it is not allowed.
Action on series properties is set to "Go to report" and expression is set to ReportPrj.AutoDesign1 only this works, if I try to use a conditional query for my expression this fails to compile.
[=IIf(Parameters!pvalue.Value = 1, "ReportPrj.AutoDesign1", "ReportPrj.AutoDesign2")]
Matter of fact anything other than ReportPrj.Design format fails to compile. Is this some kind of limitation on AX SSRS reports. If that is the case what are my other options.
Here is the compile error.
ReportPrj.AutoDesign1Pie.: Could not resolve drillthrough target report =IIf(Parameters!pvalue.Value = 1,
"ReportPrj.AutoDesign1",
"ReportPrj.AutoDesign2"
).
I am running Dynamics AX 2012 CU2, SQL Server 2008 R2, and Visual Studio 2010 on a Windows 2008 Server.
All you help is greatly appreciated.
Thank you,
mm
Is that a valid expression with the starting "[" and ending "]"?
Does this work?
=IIf(Parameters!pvalue.Value = 1, "ReportPrj.AutoDesign1", "ReportPrj.AutoDesign2")
I have a report based on Report Model and for creating dataset I use the query designer (as there is no real other way). However I am struggling with how to pass a report parameter to the query to use it as a filter. Anything starting with # is considered as a syntax error...
Is there a way?
Thank you in advance.
The trick is in the Filter definition to specify the property as a 'prompt'. This will eventually create a parameter for which you then can map the value from the report parameters.