Forum Discussion
Filter out rows in a table using a button or toggle
- 4 years ago
TheV500Oshin Here is the sample file with the solution https://www.dropbox.com/t/zcapitgXbnBiz4nX
The report looks like this
This is the measure codeMeasure = VAR Selection = IF ( ISFILTERED ('Is CEO'[CEO?] ), CALCULATE ( VALUES ( Employees[Jobtitle] ), Employees[Jobtitle] = "CEO" ), CALCULATE ( VALUES ( Employees[Jobtitle] ), Employees[Jobtitle] <> "CEO" ) ) VAR Result = IF ( HASONEVALUE ( Employees[EMPID] ), Selection ) RETURN ResultPlease let me know if this answers your query or if you need any further modifications.
Hi TheV500Oshin
Can share some screen shots of what your data looks like and what exactly you want to filter?
Thankl you
Hello,
I cannot share screenshot as it sensitive data. I need to be able to filter out the string "CEO" from a column called Jobtitle but it has to be using a toggle for the user.
- tamerj14 years agoCommunity Champion
Two buttons are ok ( Yes, No ) or you need only one ( Yes )?
- TheV500Oshin4 years agoRegular Visitor
Two buttons is fine thank you
- tamerj14 years agoCommunity Champion
TheV500Oshin Here is the sample file with the solution https://www.dropbox.com/t/zcapitgXbnBiz4nX
The report looks like this
This is the measure codeMeasure = VAR Selection = IF ( ISFILTERED ('Is CEO'[CEO?] ), CALCULATE ( VALUES ( Employees[Jobtitle] ), Employees[Jobtitle] = "CEO" ), CALCULATE ( VALUES ( Employees[Jobtitle] ), Employees[Jobtitle] <> "CEO" ) ) VAR Result = IF ( HASONEVALUE ( Employees[EMPID] ), Selection ) RETURN ResultPlease let me know if this answers your query or if you need any further modifications.