Forum Discussion
Disconnected Slicer to slice a table
- 4 years ago
Hi pmay ,
Please try this, provided your disconnected slicer looks like
1) Create a measure that captures the selected value from your disconnected slicerSelectedChain = SELECTEDVALUE(dim_slicer[Value])2) On your main table, create a measure that acts as a flag to display 1 when the selected value is found within the columnSelectFlag =var _sel = dim_slicer[SelectedChain]var _chain = MAX(DisconnectedSlicer[Value Chain])RETURNIF(CONTAINSSTRING(_chain, _sel), 1 , 0)This will give you the following result. When you've selected "IT", all rows within column "Value Chain" that have value "IT" will be assigned a value of 1.In the final step, add measure "SelectFlag" as a visual level filter to the table and set value to 1. This will show you only those rows that have values "IT"
Kind regards,
Rohit
Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 😊
Hi pmay ,
Please try this, provided your disconnected slicer looks like
1) Create a measure that captures the selected value from your disconnected slicer
In the final step, add measure "SelectFlag" as a visual level filter to the table and set value to 1. This will show you only those rows that have values "IT"
Kind regards,
Rohit
Please mark this answer as the solution if it resolves your issue.
Appreciate your kudos! 😊
Thanks - I really thought this would work, but sadly not.
The column I added seems to never see the content of the slicer, it returns 1 on every single row, regardless of what I pick in the disconnected slicer
- rohit_singh4 years ago
Solution Sage
Hi pmay ,
Apologies. selectflag must be a measure and not a calculated column.
Also, could you please verify if you're capturing the slicer value correctly?- pmay4 years ago
Resolver I
Yup this works.
So my error was misunderstanding this part:
SelectedChain = SELECTEDVALUE(dim_slicer[Value])
I was putting the same disconnected slicer in there, rather than the field to search through. Thank you very much!
In my initial post, I linked to another user who had asked the same question, you can probably just give them the same answer.
- rohit_singh4 years ago
Solution Sage
Hppy to hear that it's working for you pmay . I will put a link to this solution in the other post as well.
- pmay4 years ago
Resolver I
I've no idea why I misread that last time. I even wondered why it would be a calculated column.
I've added the SelectFlag to my table visual, but every row still returns a 1.
My SelectedChain measure:SelectedChain = SELECTEDVALUE('DIM Value Chains'[Value Chain])Which is what's in the slicer, and the content of the slicer does look like you specified - just a single value for each value chain in my dataset.Finally, my SelectFlag measure:SelectFlag =VAR _sel = [SelectedChain]VAR _chain = MAX('DIM Value Chains'[Value Chain])RETURNIF(CONTAINSSTRING(_chain, _sel), 1,0)When putting SelectedChain on a card, it returns the value selected in the Slicer.- pmay4 years ago
Resolver I
Think I've just spotted my error this time - give me a moment