Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Power BI Paginated Report parameters with (Null) values

Hi,  Would like to ask for some help with the Paginated report parameters. We have one power bi paginated report for which  datsource is power bi dataset. Requirement here is to make report parameter...
  • d_gosbell's avatar
    4 years ago

    So if you want to handle the scenario where they either pick on currency or by default if the parameter is null they get all of them then you could use the COALESCE function. What coalesce does is to return the first non-null value, so if the parameter is null it will return the value of the parameter itself

     

    EVALUATE SUMMARIZECOLUMNS

    (

    'ART REP048 UKGAAP'[Accounting_Date],

     'ART REP048 UKGAAP'[Entered_Currency],

     'ART REP048 UKGAAP'[Accounting_Period],

    FILTER(VALUES('ART REP048 UKGAAP'[Entered_Currency]), ('ART REP048 UKGAAP'[Entered_Currency] = COALESCE( @EnteredCurrency, 'ART REP048 UKGAAP'[Entered_Currency] )))

    )

     

    A similar alternative if you want to use a dropdown list in your parameter is to union on a value like "<ALL>" in the query for you parameter values then use an IF to check for this.

     

    FILTER(VALUES('ART REP048 UKGAAP'[Entered_Currency]), ('ART REP048 UKGAAP'[Entered_Currency] = IF( @EnteredCurrency = "<ALL>", 'ART REP048 UKGAAP'[Entered_Currency], @EnteredCurrency )