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
karo
Post Patron
Post Patron

Can we use Parameter for several text values at once?

Hi,

 

I would like to ask if there is a way to use Parameter for several text values at once?

 

I am trying to use parameter to reduce data when importing from cube.  For single text value is working perfectly for example Poland, but I would like to find a way to do it for example for Poland AND Denmark. 

 

Regards,

Karo

 

 

 

2 ACCEPTED SOLUTIONS
lbendlin
Super User
Super User

In boolean language it's not Poland AND Denmark, it's Poland OR Denmark.  Depending on your cube query you should be able to use enumerations (ie comma separated lists) of your desired values.

 

[column] IN ("Poland","Denmark")  etc.

View solution in original post

I see, you are trying to convert the suggested parameter values to a list?

 

= Table.SelectRows(Source, each List.Contains(Value.Metadata(Parameter)[List],[Geo.Country]))

View solution in original post

7 REPLIES 7
lbendlin
Super User
Super User

In boolean language it's not Poland AND Denmark, it's Poland OR Denmark.  Depending on your cube query you should be able to use enumerations (ie comma separated lists) of your desired values.

 

[column] IN ("Poland","Denmark")  etc.

Hi @lbendlin , Thank you for reply, however I am not sure if we are on the same page. I am trying to find a way to use parameter for several text values at once to reduce data when importing from cube.

 

karo_0-1639568883717.png

 

 

= Table.SelectRows(#"Added Items", each [Geo.Country] = Parameter or [Geo.Country] = Parameter)

Where  Parameter  represents Poland and Parameter represets  Danmark.

=Table.SelectRows(#"Added Items", each List.Contains(Parameter,[Geo.Country]) )

Expression.Error: We cannot convert the value "Poland" to type List.  😞

I see, you are trying to convert the suggested parameter values to a list?

 

= Table.SelectRows(Source, each List.Contains(Value.Metadata(Parameter)[List],[Geo.Country]))

@lbendlin Thank you so much! 🙂

no, thank you - Learned something new about Metadata today 🙂

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.