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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Saimen
Frequent Visitor

Create filter with unique values based on multivalue cells

Hello,

I've got article information in my model. with a field that contains what sport the article is. It can be just 'voetbal' (soccer) but it can also be multiple values like voetbal,casual (soccer, casual):

Saimen_0-1598514730371.png

This data is also stored this way in the SQL. 

My question is: how can i create an slider that has only the unique values in this list and when i (for example) select 'Fitniss' it selects all the fitness articles, even when its an multivalue field that contains fitness.

Thanks a lot!

 

1 ACCEPTED SOLUTION
v-alq-msft
Community Support
Community Support

Hi, @Saimen 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Table:

a1.png

 

Test:

a2.png

 

You may create a measure as below.

Visual Control = 
IF(
    COUNTROWS(
        FILTER(
            DISTINCT(Test[Key Word]),
            CONTAINSSTRINGEXACT(SELECTEDVALUE('Table'[Article information]),[Key Word])
        )
    )>0,
    1,0
)

 

Finally you need to put the measure in the corresponding visual level filter to display the result.

a3.png

 

a4.png

 

Best Regards

Allan

 

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

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

Ideally, using the Query Editor, you should have each Sporting activity should be in its own cell.  This can be accomplished by using Split Column > By rows.  You may specify the delimiter as comma.

Hope this helps.


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

Hi, @Saimen 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Table:

a1.png

 

Test:

a2.png

 

You may create a measure as below.

Visual Control = 
IF(
    COUNTROWS(
        FILTER(
            DISTINCT(Test[Key Word]),
            CONTAINSSTRINGEXACT(SELECTEDVALUE('Table'[Article information]),[Key Word])
        )
    )>0,
    1,0
)

 

Finally you need to put the measure in the corresponding visual level filter to display the result.

a3.png

 

a4.png

 

Best Regards

Allan

 

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

Hi all guys who answered me,

I just came back from holiday so sorry for the late response. I tried the solution of @v-alq-msft and that works out just fine!
Thanks for that and the other guys for helping me out here.

Just got one question left about this.
When i filter an sport, it filters my article correctly in a table, but it doesn't seem to work with an graph.

I just made an graph of the brand name + turnover and i've putted also the Sportfilter = 1 als an filter in the diagram.
For an table that worked (see image) but for graph i got nothing.

Al relations are there and when i check with other filter options (no sport) and delete the sportenfilter in the graph, the graph works normal.

Thanks again!
sporten.png

amitchandak
Super User
Super User

@Saimen , create a slicer on an independent table or use cross filter to remove join and then use a measure like

calculate(count(Table[name), filter(Table, CONTAINSSTRING(Table[article ], selectedvalue(Category[Category]))))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors