Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
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:
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
Hi @v-jiewu-msft
Thanks for your reply!
I have followed the same steps, however I got the below error in the visual
Could you please help me to solve this
Thanks You,
AravindhPi
Hi @AravindhPi ,
Based on my testing, please try the following methods again:
1.Create the simple table.
2.Drag the fruit field into the slicer visual.
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.
5.The result is shown below.
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.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
93 | |
90 | |
84 | |
70 | |
49 |
User | Count |
---|---|
141 | |
120 | |
112 | |
60 | |
59 |