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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

How can I define a parameter to have a label-value pair so that the user always sees the label?

Hi All,

Consider the scenario where I have a table of Countries

IDName
1United States of America
2France

 

  • I have a Query which is bound to a SQL stored procedure which accepts a Country ID and gives me some data specific to the Country. 
  • I have a simple Tabular report which is bound to the above SQL stored proc.

 

Question

How can I make my parameter selection more intuitive for the end user by displaying a drop of Country names (United, France, etc.) as opposed to Country IDs (1,2, etc.) . This was very easy in SSRS.

 

 

Thanks,

Sau

 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

Both slicers and filters refine query results, but the main difference is that a slicer operates on-canvas, whereas, filters are configured and operate in the background of reports. The main difference between a Power BI slicer and a filter is that a slicer is an on-canvas, dynamic feature, whereas, a filter (page level in this case) is a hidden, static feature. Furthermore, a filter can refine an entire report, just a page or simply a visual on the canvas.

Advantages of Using a Filter

– It can be applied on different levels: Report, Page and Visual.

– A filter can be applied to a specific object on the page, such as tables, charts or cards.

– It can be applied between pages of the same report.

– A filter can be used to reference objects across other reports.

 

Advantages of Using a Slicer

– A slicer is user friendly; they are displayed on the canvas.

– Report users can pick and choose what they want displayed in the visuals.

– Even though slicers are restricted to a report page, you can add slicers to several pages and synchronize their actions across those same pages.

 

You can refer this blog: The Differences Between a Power BI Slicer and a Filter 

 

Best Regards,
Yingjie Li

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

View solution in original post

6 REPLIES 6
v-yingjl
Community Support
Community Support

Hi @Anonymous ,

Besides create parameters in power query editor, you can also try to use the country field to create a slicer in the report directly to filter specific country data in power bi desktop.

 

Best Regards,
Yingjie Li

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

Anonymous
Not applicable

Hi @VijayP 

 

 
Thanks for looking into this.
This is how I know how to create a Parameter from the Power Query Editor.
 
 

Step 1 - Create a List query which returns the IDs

ListQuery.png

 

Step 2 - Create a new Parameeter which references this List for suggested values

 

Parameter.png

 

This works. However, what I want in the parameter is a label
IdLabel
2John Doe
3Jane Doe
which should resolve to the underlying Id. The raw Id makes little sense to the end user.
 
Is this possible?
 
 
Thank you,
Sau

 

 

 

@Anonymous 

Create a Custom Column to indicate what is John Doe and Jane Doe

and then create the parameter based on the Custom Column




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Anonymous
Not applicable

Hi @v-yingjl 

 

 

Yes, slicers does appear to solve my problem. In the example below, I have bound a slicer using a computed column "FullName".

 
 

Slicer.PNG

Question

What benefit does a Slicer visual have over simple Filters . I could have achieved the above by dropping the FullName column into the "Filters on this page" panel?

 

Slicer_benefit_page_filter.png

 

Thank you,

Sau

 

Hi @Anonymous ,

Both slicers and filters refine query results, but the main difference is that a slicer operates on-canvas, whereas, filters are configured and operate in the background of reports. The main difference between a Power BI slicer and a filter is that a slicer is an on-canvas, dynamic feature, whereas, a filter (page level in this case) is a hidden, static feature. Furthermore, a filter can refine an entire report, just a page or simply a visual on the canvas.

Advantages of Using a Filter

– It can be applied on different levels: Report, Page and Visual.

– A filter can be applied to a specific object on the page, such as tables, charts or cards.

– It can be applied between pages of the same report.

– A filter can be used to reference objects across other reports.

 

Advantages of Using a Slicer

– A slicer is user friendly; they are displayed on the canvas.

– Report users can pick and choose what they want displayed in the visuals.

– Even though slicers are restricted to a report page, you can add slicers to several pages and synchronize their actions across those same pages.

 

You can refer this blog: The Differences Between a Power BI Slicer and a Filter 

 

Best Regards,
Yingjie Li

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

VijayP
Super User
Super User

@Anonymous 

In Power Qeury Editor you can create a parameter based on Country Name. Did You Try?




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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