Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have status filter which Final, In-progress,Not started .
Scenario :
If the user selects Final status from the filter then CY 2023 should be displayed in the text box.
If the user selects In-progress from the status filter then CY 2022 should be displayed in the text box.
If the user selects Final from the status filter then CY 2017,2018,2019,2020 should be displayed in the text box.
Hi.
So in the field Status we have three posible values 'Final', 'In-progress', 'Not started'. Am I right?
Use this formula if you're on Qlik Sense or recent QlikView version:
=Coalesce(Pick(Match([Status], 'Final', 'In-progress', 'Not started'), 'CY 2023', 'CY 2022', 'CY 2017,2018,2019,2020'), 'Select status')
Match(Status, ...) is returning a number between 1 and 3 depending on the selected value in Status.
Pick() Associates this number to each positioned parameter, 1 is CY 2023, 2 is CY 2022... and so on.
Coalesce() checks if the result of the inner operations Pick(Match()) has a valid representation, if doesn't, displays 'Select status'. This might happen when the filter is not used.
If doesn't work with coalesce() use this:
=if(GetPossibleCount(Status)=1,
Pick(Match([Status], 'Final', 'In-progress', 'Not started'), 'CY 2023', 'CY 2022', 'CY 2017,2018,2019,2020'), 'Select status')
GetPossibleCount() just checks how many current possible values are in the Status field.
Regards,
Hi.
So in the field Status we have three posible values 'Final', 'In-progress', 'Not started'. Am I right?
Use this formula if you're on Qlik Sense or recent QlikView version:
=Coalesce(Pick(Match([Status], 'Final', 'In-progress', 'Not started'), 'CY 2023', 'CY 2022', 'CY 2017,2018,2019,2020'), 'Select status')
Match(Status, ...) is returning a number between 1 and 3 depending on the selected value in Status.
Pick() Associates this number to each positioned parameter, 1 is CY 2023, 2 is CY 2022... and so on.
Coalesce() checks if the result of the inner operations Pick(Match()) has a valid representation, if doesn't, displays 'Select status'. This might happen when the filter is not used.
If doesn't work with coalesce() use this:
=if(GetPossibleCount(Status)=1,
Pick(Match([Status], 'Final', 'In-progress', 'Not started'), 'CY 2023', 'CY 2022', 'CY 2017,2018,2019,2020'), 'Select status')
GetPossibleCount() just checks how many current possible values are in the Status field.
Regards,