Forum Discussion
Paginated Reports "All" parameter
- 7 years ago
Blast. It was a picky little syntax error.
EVALUATE ( ...
The command shown above is no good. Report Builder does not like that white space between the EVALUATE keyword and the open pren. The following variation worked fine.
EVALUATE( ...
Thanks for taking the time to look into the problem.
Hi RBunting , I have the same business case - I already have my Parameter values with All., but now the problem is with the Dataset query.
How d you manage to filter - is All - Show All, otherwise the selected value.
I'm using this condition RSCustomDaxFilter(@Measure,EqualToCondition,[v_MeasureDetail_Latest].[MeasureCode],String) in the main dataset query. but here I can't add any OR condition.
I tried to do it in the expression of the Parameter itself like:
IIF(@Measure = "All", Nothing, Parameters!Measure.Value) or IIF(@Measure = "All", True, Parameters!Measure.Value), but no luck there either, I get error for passing invalid value to the parameter.
How did you apply the parameter to your dataset afterwards?
Thanks!
- RBunting6 years agoAdvocate III
My entire query is a dynamic expression that generates a valid DAX statement.
During the evaluation of the query text, I check the parameters and build the specific query language to send to the source system.
="EVALUATE(FILTER(... " + iif( Parameters!Plant.Value <> "ALL", "&& 'PLANT PR1'[Plant Number] = """ & Parameters!Plant.Value & """", "") + " ...so, if the parameter is not set to "all," this line in the query becomes a piece of the filter conditions "&& 'PLANT PR1'[Plant Number] = "99999999". But if the plant number IS set to "all" then this whole bit just gets omitted from the DAX query and no filter on Plant is ever applied.
- pdacheva6 years agoAdvocate II
Hi RBunting,
Thank you for your reply!
Sorry for not replying earlier - I changed the filtering of this dimension within the DAX (not using the RSCustomDaxFilter formula) and it worked as expected.
Best,