Forum Discussion

mkavcic's avatar
mkavcic
Frequent Visitor
4 years ago
Solved

Paginated report - optional parameter

Hi,   In paginated report, I would like to check if nothing is selected in the parameter, then this parameter would not be used in the dax query.   How can I achieve this?   For example, I hav...
  • mkavcic's avatar
    4 years ago

    Hi,

    Thank you for your answer!

     

    I did solve it in this way:

    1. Add a 'dummy' item called 'All' to the list of items in parameter query.

    2. Make the new item 'All' defualt. You could also use 'Null' here.

    3. Modified the DAX query in VBA with query.commandtext where I entered the command IIF(Parameter.Value = "All", "", "__Usefilter"), meaning if there is 'All' selected then do not use the filter, but if one item is selected then use the filter.

     

    Hope it helps.

    Thank you!