Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Customer | Current Year | Last year | Status |
A | 100 | 50 | UP |
B | 200 | 500 | DOWN |
C | 300 | 500 | DOWN |
D | 400 | 300 | UP |
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
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.
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.
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.
Customer | Current Year | Last year | Status |
A | 100 | 50 | UP |
B | 200 | 500 | DOWN |
C | 300 | 500 | DOWN |
D | 400 | 300 | UP |
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.
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.
Customer | Current Year | Last year | Status |
A | 100 | 50 | UP |
B | 200 | 500 | DOWN |
C | 300 | 500 | DOWN |
D | 400 | 300 | UP |
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
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.
Hi Jagan,
here is the sample file
Hi ,
Please find the attached QVW.
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
Hi Derrell,
Please find attached file for solution.
Regards,
Jagan.