Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!See when key Fabric features will launch and what’s already live, all in one place and always up to date. Explore the new Fabric roadmap
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 @Anonymous
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.
User | Count |
---|---|
88 | |
74 | |
69 | |
59 | |
56 |
User | Count |
---|---|
40 | |
38 | |
34 | |
32 | |
28 |