Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Display M query parameter value in report

Hi, I'm accessing SAP HANA views (in import mode) that have built-in parameters - in Power Query, it looks something like "{Cube.ApplyParameter, "GL_Account_Hierarchy", {"LDQFIVB5J8NN8GPFX77QEOJ7L"}}". Are there DAX functions that can access the parameter names and values so I can display them on the report as information? I.e, parameter name is "GL_Account_Hierarchy" and value is "LDQFIVB5J8NN8GPFX77QEOJ7L". Ideally, the value should display text label associated with the key, which is not very user-friendly :). Thank you in advance!

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous 

    Could you tell me if your problem has been solved? If it is, kindly Accept the helpful reply as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your problem or share me with your pbix file from your Onedrive for Business.

     

    Best Regards,

    Rico Zhou

8 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Amit, the code is part of the Power Query, not the returned results. There're parameters built into the database level that need to be filled before results come back. We want to display the parameter value on the report itself. Thanks!

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Anonymous 

        If you want to see your parameters in your Report Field, you can right click your parameters and select enable load.

        Then you can see your parameters in your Report Field, and use it to build visuals.

        Result:

        Best Regards,

        Rico Zhou

         

        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Rico, your solution works for parameters created within Power BI, not when the parameters are built in the source database view. Thanks.