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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
AravindhPi
New Member

Help Needed: Filtering Visuals with User-Selected Value in Multi-Value Columns

Hi everyone,

 

I'm facing an issue with filtering visuals based on user selections and could really use some help. Here's the situation:

 

    I have a column in my table that contains multiple values in the same cell (e.g., "apple, banana, cherry").
    I want the user to be able to select a single value dynamically (like "apple").
   The goal is for the visuals to filter based on this user-selected value, even though the column contains multiple values.

 

For example, if the user selects "apple", the visual should filter to show rows where the column includes "apple" among other values.

 

The source is shared dataset and it is in live connection

 

What I did for this is that I have created a table in source, which has distinct values in each row, then I have added the created table to the semantic model.

Idea is to provide the new table values as input to the filter. If the user selects any value then it should filter the existing table column. however when I try to show it in the slicer, I am getting the following error:

 

AravindhPi_0-1717501116921.png

Note: (there is no relationship established and if we do, we will end up with multiple duplicates) 

 

I have used the following Dax for checking and filtering user input, if the slicer worked:

 

FilteredRows =
VAR SelectedCode = SELECTEDVALUE(New Table[Single value column])
VAR Result = 
IF (
ISBLANK(SelectedCode),
BLANK(),
IF (
CONTAINSSTRING(SELECTEDVALUE(Exisitn Table [Multivalue column] ), SelectedCode),
1,
BLANK()
)
)

RETURN Result

 

I've been struggling to get this to work and would appreciate any advice or solutions you can offer. Has anyone dealt with a similar scenario before?

 

Thanks in advance for your help! @amitchandak @Ashish_Mathur @lbendlin @Ritaf1983 

 

Best regards,
AravindhPi

2 REPLIES 2
AravindhPi
New Member

Hi @v-jiewu-msft 
Thanks for your reply!

 

I have followed the same steps, however I got the below error in the visual

AravindhPi_0-1717588067806.png

Could you please help me to solve this

Thanks You,

AravindhPi

v-jiewu-msft
Community Support
Community Support

Hi @AravindhPi ,

Based on my testing, please try the following methods again:

1.Create the simple table.

vjiewumsft_0-1717566973897.png

vjiewumsft_1-1717566984447.png

2.Drag the fruit field into the slicer visual.

vjiewumsft_2-1717567000965.png

3.Create the new measure to filter the column contains selected value.

Measure = 
var frui_ = SELECTEDVALUE('Table test'[Fruit])
var t_fruit = SELECTEDVALUE('Table'[Sales])
RETURN
IF(CONTAINSSTRING(t_fruit, frui_), 1, 0)

4.Set the show items is 1 in filters pane.

vjiewumsft_3-1717567010375.png

5.The result is shown below.

vjiewumsft_4-1717567025730.png

Best Regards,

Wisdom Wu

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.