Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlik heads,
,
can you advise me on the below issue?, Issue is I have a table with Group and KPI as fields.
LOAD * Inline [
Group
CL
ED
HV
IE
SB
];
Join
A:
LOAD * Inline [
KPI
To
From
Country
];
whenever I open the application it should show KPIs "From" and "Country" with default selection as From and all the groups. then when I select "CL" in the list of groups, KPI should show "To" and "country" and the group "CL".
Ideally, when I select groups other than "CL", KPI should show From and Country, if the group is "CL" it should show "To" and "Country" , if the previous selection in KPI is "From", upon selection of "CL" group it should show "To" if it is country there shouldn't be any change in KPI selection.
PFA for the sample data.
Many thanks in advance!!!
Check now
Hi,
you can use field event triggers
settings --> document properties --> trigger -->Field Event Triggers.
Please refer the attached qvw file
Thanks,
Pooja
Hello Pooja,
Thank you for the response, As I said the KPI list box should always show two values.
Also, always it has to show one selected value based on the conditions I have mentioned in my earlier post
Ideally, when I select groups other than "CL", KPI should show From and Country (it should not select both only one should be selected default is "From"), if the group is "CL" it should show "To" and "Country" , if the previous selection in KPI is "From", upon selection of "CL" group it should show "To" if it is country there shouldn't be any change in KPI selection.
please consider below expression in your trigger
=if(Group='CL','("Country"|"To")',if(Group<>'CL','("Country"|"From")'))
I hope this will help you
Regards
Ahmar
Hello Ahmar,
Thank you for your Response!!
You expression need a slit modification (removed double quotes)
=if(Group='CL','(Country|To)',if(Group<>'CL','(Country|From)'))
Also, my expected result is , when I open the application KPI has to show like
On Open:
when I select Group "CL" KPI has to show
when I return to other Groups it should show
Always the KPI has to show 2 values and one value has to be selected.
Also, when I select Country and group CL it should show
if I select other than "CL" group I should see
in the above two screen shots you can see the change from "To" to "From" when the selection switched to non "CL" group to "CL" from Group.
I hope I have explained my issue bit better than earlier.
Thanks
I understand your requirement john.
Go to Seeting->Document Properties
You have to trigger on Document Event Triggers and Field Event Trigger refer below screenshot.
1-Document Event Triggers (OnOpen)
2-Field Event Trigger (On Grop Field)
=if(Group='CL','(Country|To)','(Country|From)')
Regards
Ahmar
Thank you for your time Ahmar,
I tried the above methods but no luck , KPI object is selecting two values but I need only one value at a time, also KPI should not display 3 values (To, from Country) at any point od time it has to show two values (From, Country) or (To, Country)
Can you check if attached is working for you
Thank you for looking into this mater Sunny,
it is not working as I expected,
EX: when I clear Group field and try to select Country from KPI I am not able to select it.
With triggers, it always very difficult to get all the things you want... but try now