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
dzilupl
New Member

Parameter - show another description than value

Is there any possibility in Power BI Desktop to use another description to parameter value?

For example I have parameters like A,B,C,D which have thier names like in this table:

Zrzut_20170529_150258.jpg

 

Now I have simple table with Date, Value and Region where Region is connected with my parameter

Zrzut_20170529_150538.jpg

 

Region can by only one ore more than one (like 2 last record on 29.05.2017). I'm filtering rows with parameter and this works ok but I want to give the person who will use this report possibility to choose parameters not like A,B,C,D but like "Region 1", "Region 45",  "Region 67", "Region 124". This is only simple example data to show what I need.

 

This is only simple example data to show what I need.

1 ACCEPTED SOLUTION
MarcelBeug
Community Champion
Community Champion

Already available, tables:

- Parameters
- SimpleTable

 

Create a list ParameterDescriptions:

 

= Parameters[Parameter description]

 

Create a parameter Region:

 

Parameter Region.png

 

Create a query Parameter:

let
    Source = Parameters,
    #"Filtered Rows" = Table.SelectRows(Source, each [Parameter description] = Region),
    #"Parameter value" = #"Filtered Rows"{0}[Parameter value]
in
    #"Parameter value"

Create a query Result:

 

let
    Source = SimpleTable,
    #"Filtered Rows" = Table.SelectRows(Source, each Text.Contains([Region], Parameter))
in
    #"Filtered Rows"
Specializing in Power Query Formula Language (M)

View solution in original post

2 REPLIES 2
MarcelBeug
Community Champion
Community Champion

Already available, tables:

- Parameters
- SimpleTable

 

Create a list ParameterDescriptions:

 

= Parameters[Parameter description]

 

Create a parameter Region:

 

Parameter Region.png

 

Create a query Parameter:

let
    Source = Parameters,
    #"Filtered Rows" = Table.SelectRows(Source, each [Parameter description] = Region),
    #"Parameter value" = #"Filtered Rows"{0}[Parameter value]
in
    #"Parameter value"

Create a query Result:

 

let
    Source = SimpleTable,
    #"Filtered Rows" = Table.SelectRows(Source, each Text.Contains([Region], Parameter))
in
    #"Filtered Rows"
Specializing in Power Query Formula Language (M)

Thanks! That works as I wanted.

I see that I have to learn a lot about Power BI and how to build advanced queries. I have to look for some good and fast tutorials

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.