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

How to use DAX Filter using IN with String Parameter ?

Hi All,

I want to add a custom column to a table B with certain calculation to get the maximum value on a product from another table A, however each event_venue_id in the table B might have different products mapping.

 

This is the source table A for calculation (i created a column called productid_string with datatype Text) :

pbi3.PNG

 

I've prepared the list of products mapping for each event_venue_id, by adding column productidlist in table B like this :

pbi4.PNG

 

the result in table B (column productidlist)

pbi2.PNG

 

Then I create the custom column in table B (ITR M-3) to get maximum value of product like this.

When I fetched the values into a variable and use it within filter it wont' work using double quotes, then i tried to test manually using unichar(34) and it works.

 

pbi.PNG

 

Can someone help me how to fix the parameter or how to filter using multiple values of product id?

 

Thank You

 

2 REPLIES 2
v-yiruan-msft
Community Support
Community Support

Hello @alvinyurisman ,

Do you want to get the maximum product number from each hospital at the same time? For example: hospitalid 88790, the expected value of ITR M-3 is 96? Has any relationship been created between table A and table B? If yes, what field is the connected field?

max product.JPG

Best regards

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
Super User
Super User

One, having a bit of trouble following this one. Sample data as text would help recreate. Expected output from that source data would also help. You have a lot of it in the post but there are some missing elements. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

For example, I don't understand where those funky quotes are coming from. Can you strip those out in Power Query? It's very odd to have those in the data.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.