Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

URL parameters

one of the parameter passing is not passed into the paginated report paramater. it is a date parameter for some of the dates it getting correctly passed and for others it is showing like this   ...
  • parry2k's avatar
    5 years ago

    Anonymous I recently did a session in Vancouver meetup on paginated reports and one of the sections was to pass parameters from Power BI to call paginated report which contains date. Can you make sure you are using the correct parameter name when creating a URL, here is my measure that I used in Power BI desktop to call the paginated report and passing parameter values. 

     

     

    Export URL = 
    VAR __baseReportURL = "https://app.powerbi.com/groups/xx-xx-xx/rdlreports/yyy-yyy-yyy"
    
    VAR __parametersCustomer = "rp:DimCustomerCustomer=" 
    VAR __parameterCustomerValue = 
            __parametersCustomer & 
            CONCATENATEX ( 
                VALUES ( 'DimCustomer'[Customer] ), 
                'DimCustomer'[Customer],
                "&" & __parametersCustomer
            ) 
    VAR __parameterFromDate = "&rp:FromCalendarDate=" & FORMAT ( MIN ( 'Calendar'[Date] ), "YYYY-MM-DD" )
    VAR __parameterToDate = "&rp:ToCalendarDate=" & FORMAT ( MAX ( 'Calendar'[Date] ), "YYYY-MM-DD" )
    VAR __exportSettings = "&rdl:format=EXCELOPENXML&rdl:reportView=pageView&rdl:parameterPanel=hidden&rdl:targetSameWindow=true"
    RETURN
    __baseReportURL & "?" & __parameterCustomerValue & __parameterFromDate & __parameterToDate &  __exportSettings
    

     

     

    Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

  • Anonymous's avatar
    Anonymous
    5 years ago

    HI Anonymous,

    You need to know the embedded paginated report URL first, then you can copy it and use it with Dax expression to concatenate the URL with filters.
    After these, you can set the button action type to 'web URL' and bind it to your measure formula. (notice: change the data category of measure to web URL)

    Regards,
    Xiaoxin Sheng