Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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!

1 ACCEPTED SOLUTION

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

View solution in original post

8 REPLIES 8
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.

Hi @Anonymous 

Could you load your parameter in data source into Power BI? If you couldn't, you can try to build a parameter in Power BI by Manage Parameter Function.

Here are some blogs about parameters in power bi.

Blog1: Using parameters

Blog2: Power BI Introduction: Working with Parameters in Power BI Desktop

Video: Making data source parameters easy in Power BI Desktop

 

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
Not applicable

Thanks Rico. The database layer is managed by a different team. We'll suggest to move the parameters to Power BI layer 😀.

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

Anonymous
Not applicable

Yes, got it working. Basically I created corresponding parameters within Power BI to fill in the paramters built-in the database view. Thanks!

amitchandak
Super User
Super User

@Anonymous , Are these column values?

if so you have split these first and then pivot the GL_Account_Hierarchy and its value

https://www.tutorialgateway.org/how-to-split-columns-in-power-bi/

pivot: https://radacad.com/pivot-and-unpivot-with-power-bi

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!

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.

2.png

Result:

2.png

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. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.