Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content
Announcements
Gartner® Magic Quadrant™: 15 YEARS A LEADER - GET THE REPORT
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Filtering chart table

Hello friends of QV,

i have a chart table where I have a column (Status) that shows "UP" or "DOWN" using a simple logic (If col A > col B, "UP", "DOWN").

Is there a way i can now have a listbox containing the word "UP" and "DOWN" so that when i click on it, the chart table should then only show all values where column Status = "UP" or only values where column = "DOWN". Any ideas much appreciated.

This is how i am currently displaying the table. 

CustomerCurrent YearLast yearStatus
A10050UP
B200500DOWN
C300500DOWN
D400300UP

however, current Year and Last Year columns are calculated; so depending on what period is selected, the Current Year and Last Year will change. Hence, the status column is also dynamic.

thanks in advance

Derrell

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

15 Replies
Siva_Sankar
Master II
Master II

Derrell, You can do that by using the expression in the listbox with same formula as mentioned by you. find the attached document working example with your data.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this in script, you need to arrive a new column in script like below

LOAD

*,

If(ColA > ColB, 'UP', 'DOWN') AS Status

FROM DataSource;

Now use Status field as listbox to filter the data.

Hope this helps you.

Regards,

Jagan.

Anonymous
Not applicable
Author

Thanks Jagan

good ideas.

But i think i should have been more detail in my example.my bad.

This is how i am currently displaying the table.   

CustomerCurrent YearLast yearStatus
A10050UP
B200500DOWN
C300500DOWN
D400300UP

however, current Year and Last Year columns are calculated; so depending on what period is selected, the Current Year and Last Year will change. Hence, the status column is also dynamic.

sorry for the poor initial explanation of my problem.

Anonymous
Not applicable
Author

Thanks Shankarece

good ideas.

But i think i should have been more detail in my example.my bad.

This is how i am currently displaying the table.   

CustomerCurrent YearLast yearStatus
A10050UP
B200500DOWN
C300500DOWN
D400300UP

however, current Year and Last Year columns are calculated; so depending on what period is selected, the Current Year and Last Year will change. Hence, the status column is also dynamic.

sorry for the poor initial explanation of my problem.

regards

Derrell

jagan
Luminary Alumni
Luminary Alumni

Hi,

Then create and Island table like below, it should not link with your data model

Status:

LOAD

*

INLINE [

Status

UP

DOWN];

Now in the front end provide this as filter.  Alter you expression to display accordingly.  If you attach a sample file then it would be easier to provide the solution.

In the expression try like this

If(ColA > ColB AND Concat(Status, ',') LIKE '*UP*', 'UP',

If(ColA <= ColB AND Concat(Status, ',') LIKE '*DOWN*', 'DOWN'))


Hope this helps you.


Regards,

Jagan.

Anonymous
Not applicable
Author

Hi Jagan,

here is the sample file

Not applicable
Author

Hi ,

Please find the attached QVW.

Anonymous
Not applicable
Author

thanks, Reshma.

it works.

however, have a look at my replies to the team on some added complexity

i've attached a sample file for Jagan.

regards

Derrell

jagan
Luminary Alumni
Luminary Alumni

Hi Derrell,

Please find attached file for solution.

Regards,

Jagan.