Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
I want to create a single filter XYZ in the script. This will act like conditional button for different conditional charts.
chart 1: Show employee name
— If the filter XYZ is ‘YES’ then show the names of employees whose name length is more then 9 characters
— if the filter XYZ is ‘NO’ then show the names less than 9 characters
chart 2: Show employee salary
— if the same filter XYZ is selected ‘YES’ this chart should show all the salaries which are more than 50000
– if the same filter XYZ is selected ‘NO’ the same chart should show less than 50000
chart 3: Show employee city
— if filter XYZ is ‘YES’ this chart should cities names starting with A,B,C
— if filter XYZ is ‘NO’ this chart should show cities with D,E,F
chart 4: show employee date of joining
— if filter XYZ is ‘YES’ this chart should show dates before 2019
— if the filter XYZ is ‘NO’ this chart should show dates after 2019
@sandp707 if it resolves your problem. Please accept it as a solution.
@sandp707 Could you please provide us with the sample data that would help us better understand the requirement and help you. Thanks.
Hello sidhiq,
Attached the sample data
Hello Sandp, I have created a QVF file for you. Just click on the filter XYZ and see the changes happening.
Please let me know if it has solved your issue.
Hello Sidhiq,
The qvf file is not supporting. Could you please send me qvw format of the same if fine for you.
Thanks,
Sandeep
@sandp707 Are you working on Qlikview or Qlik sense? Because converting from QVF to QVW is not possible. I might have to create the entire thing in the Qlikview.
Sidhiq,
Could you please give me the script part which you used to create the qvf.
Thanks
@sandp707 I have not created anything in the Script. Everything was done in the front end only. Anyways I will take you through the steps, let me know if you can follow this. But this is going to be lengthy.
Step1: Below is the Script that was used:
NoConcatenate
Temp:
LOAD
Name,
Designation,
"Joining Month",
"Year",
CTC,
Gender,
Prefix,
Country
FROM [lib://Qlik Practice/Qlik Community Button.xlsx]
(ooxml, embedded labels, table is Sheet1);
NoConcatenate
ButtonObject:
Load * Inline [
ButtonName, Value
Yes, 1
No, 0
];
Exit Script;
Step2: I have created 8 chart(i.e. 8 straight tables) for 'YES' and 'NO' condition and added them to the master Items.
Step3: Then I made use of Container for Each of the above Condition,i.e. you need to create 4 Container containing 2 straight tables one is for YES and other is for NO.
Let me take a example of below condition to explain in detail:
chart 1: Show employee name
— If the filter XYZ is ‘YES’ then show the names of employees whose name length is more then 9 characters
— if the filter XYZ is ‘NO’ then show the names less than 9 characters
For Employees having more than 9 character, I created a straight table with 2 dimension.
a. Name : I used a calculated dimension like:if(Len(Name)>9,Name)
b. Length of the Name: I calculated Len(Name)
For Employees having less than 9 character, I created a straight table with 2 dimension.
a. Name : I used a calculated dimension like:if(Len(Name)<=9,Name)
b. Length of the Name: I calculated Len(Name)
Now add these 2 tables to master Item
Next Step is to create a Container object and add these 2 master items that you have created.
But the trick now for each master Item that you have added to the container, add the Show Condition Value=1 for YES and Value=0 for NO.
Step 4: Add the Filter Pane and Dimension for that is ButtonName.
Once this is successful please repeat for other 3 conditions.
@sandp707 if it resolves your problem. Please accept it as a solution.