I have a value column named ‘Transaction’, It has two values, ‘failed’ and ‘other’. I want to use a custom filter (let’s name it as ‘Transactions’) and it will have 2 select options, ‘All’ and ‘failed_exluded’. When I choose ‘All’ it will show all the rows for both ‘failed’ and ‘other’ transaction. And when I choose ‘failed_exluded’ then it will only show rows that contains ‘others’.
For example, I have 10 rows in total, 2 of these are ‘failed’ transaction, and 8 of these are ‘other’ transaction. So when I choose ‘All’ it will show all 10 rows, but when I will choose ‘failed_excluded’ it will show 8 rows, excluding rows that have ‘failed’ transaction. Is there anyway this can be achieved? I was trying to use parameter, without any luck.
Hi @sadhanm22
Welcome to the QuickSight community!
Yes, you can achieve this functionality by using a parameter-based filter in combination with a calculated field.
- Create a new parameter, name it
Transactions
- Create a control for the parameter to allow users to select between
All
andFailed_Excluded
. - Go to “Controls” and add a new control linked to the parameter you just created.
- This will give users the option to choose between
All
andFailed_Excluded
. - Create a new calculated field named
Filter_Transactions
with the following formula.
ifelse(
${Transactions} = 'All', 1,
${Transactions} = 'failed_excluded' AND {Transaction} = 'other', 1,
0
)
- Drag the calculated field
Filter_Transactions
into the Filters pane. - Set the filter condition to Filter_Transactions = 1.
Thank you so much @Xclipse for taking time and answer in so detailed. It worked perfectly.