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
longhorn2009
Frequent Visitor

Multi-Select Search Measure

HI All,

 

I have been playing out with how to figure out how to do a contains filter for two tables that I am unable to join due to the lack of data for some of the values.

 

In on table I have:

Project IDWorkstream IDValue
59 2
98 6
15329
15596
17161

 

In a master table I have in the dataverse, I have:

Project IDWorkstream ID
594
595
596
987
988
989
1532
1559
1716
1720

 

Since some of the data entered don't have Project IDs, I would like to filter the data from the Project Level to show all underlying workstreams (including blank IDs). If there is a Workstream ID, when I select the second level of the hierarchy from the master table, I would like to only see that Workstream ID.

 

Normally I would use a key to join the two tables but the items with blank Workstream IDs would not be brought in. 

 

I tried the following measure but as soon as you select mulitple Project IDs, it reverts to showing all matches and not just those in the selected Project ID Master Filter. It does work when you only select one Project ID or one Workstream ID, however users are asking for this to work with a Multi-select filter:

 

Filter =
VAR searchproject =
EXACT(
        SELECTEDVALUE ( Workstream[Project ID] ),
        SELECTEDVALUE ( ADKARStatusChecks[Project ID] )
    )


VAR searchworkstream =
EXACT(
        SELECTEDVALUE ( Workstream[Workstream ID] ),
        SELECTEDVALUE ( ADKARStatusChecks[Workstream ID] )
    )

RETURN
IF( HASONEVALUE(Workstream[Project ID] ) && searchproject=True, "Found",
IF( NOT HASONEVALUE(Workstream[Project ID] ) && searchproject=False, "Found"))

Any help will be greatly appreciated!
4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

Clearly show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-yueyunzh-msft
Community Support
Community Support

Hi , @longhorn2009 

According to your description, you want to "do a contains filter for two tables"  and thanks for your sample data.

I am not fully understand the end result you want to need, and in Table2 ,like [Project ID]=59 , it has three [Workstream ID]. What do you want to need?

And what is the field in the slicer? Can you share the end result sample data to us, like a table ?

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

So in the example above with the fake data, I would be able to select Project ID 59 and 1 from the Master Table filter and get the value of 18.

Hi , @longhorn2009 

I still not understand your need , when we select Project ID 59 and 1 from the Master Table filter, it just return the value of 18 , like this:

vyueyunzhmsft_0-1671757304887.png

 

If this method does not meet your needs, you can provide us with  the desired output sample data in the form of tables, so that we can better help you solve the problem.

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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.