The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
I have a table of site locations with some columns of data in a visual. I would like the user to be able to click on one location (a single row) and be able to remove it from the table. In other words, I want the user to be able to "blacklist" any location (a single row). I would then have another table that lists all the blacklisted locations, and if desired, the user would be able to select a row in this blacklist table and remove it from the blacklist table and therefore put it back into the main table.
To give further context of the purpose of what I want: I have a filter in my main table that shows the user the top 20 rows; sometimes there are locations that the user may want to exclude and therefore have additional rows that would have been excluded since there is a top 20 filter applied.
I thought of adding a column to my main table called "blacklist flag" where all the values are equal to 0, and then filtering my main table to only include rows where blacklist flag column is equal 0. Then I would have a second table that is the same as the first table but where the there is a filter that only allows rows with the blacklist flag column to be 1.
Only issue is I have no idea how to let the user to select a row and change value in the blacklist flag column. I guess I could add the blacklist flag column in the raw data source and have the user change the values in the raw data but this solution seems tedious.
Is there a more elequont solution? Have I gone about this issue the wrong way? Any ideas are welcome.
Solved! Go to Solution.
Hi @PowerCI ,
According to your description, you can use measure in conjunction with slicer and filter to achieve.
Sample data
NameValue
A | 30 |
B | 70 |
C | 60 |
D | 90 |
Cretae a table
Slicer Table = VALUES('Table'[Name])
Create a measure
IsInSlicerTable =
IF(
SELECTEDVALUE('Table'[Name]) IN VALUES('Slicer Table'[Name]),
1,
0
)
Apply the measure to slicer
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @PowerCI ,
According to your description, you can use measure in conjunction with slicer and filter to achieve.
Sample data
NameValue
A | 30 |
B | 70 |
C | 60 |
D | 90 |
Cretae a table
Slicer Table = VALUES('Table'[Name])
Create a measure
IsInSlicerTable =
IF(
SELECTEDVALUE('Table'[Name]) IN VALUES('Slicer Table'[Name]),
1,
0
)
Apply the measure to slicer
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Yes this works! Thanks so much.
Only caveat is that if no values are selected in the slicer then the table is blank, which I find a little puzzeling. Not a big problem as I can always keep at least one location selected.
@PowerCI I don't think there is going to be any easy solution to achieve this, even if there is one, it will be super complicated, and not user friendly.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
☹️
User | Count |
---|---|
68 | |
63 | |
59 | |
54 | |
28 |
User | Count |
---|---|
181 | |
82 | |
63 | |
47 | |
43 |