Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All:
I have a question of the stack(group) issue in bar chart. The problem is that currently, i have 4 bar, which are Inflow(Operating), inflow(Financial), outflow(Operating) and Outflow(Financial) and the dimentsion is Month. Now, i'd like to stack the two expression of Inflow(Operating and Financial) and Stack two expression of Outflow too, and then group the two stackted bar. So, finanlly, there are two stacked bar for each month, Inflow and Outflow respectively. And in each bar, they are divideded into operating and Financial. Does it works in QV?
Thanks
Stefanie
Hi Stefanie,
I have solve such a similary problem with joining and flagging the data in the script.
Something like:
LOAD
month,
value,
'inflow' AS flag1,
'operating' AS flag2
RESIDENT table
where value_type = inflow_operating;
JOIN LOAD
month,
value,
'inflow' AS flag1,
'financial' AS flag2
RESIDENT table
where value_type = inflow_financial;
JOIN LOAD
month,
value,
'outflow' AS flag1,
'operation' AS flag2
RESIDENT table
where value_type = outflow_operation;
JOIN LOAD
month,
value,
'outflow' AS flag1,
'financial' AS flag2
RESIDENT table
where value_type = outflow_financial;
In the bar chart you have the dimensions: month, flag1, flag2 and the expression is sum(value).
In the tab "design" you have to check stacked.
Regards vicky
Hi Stefanie,
I have solve such a similary problem with joining and flagging the data in the script.
Something like:
LOAD
month,
value,
'inflow' AS flag1,
'operating' AS flag2
RESIDENT table
where value_type = inflow_operating;
JOIN LOAD
month,
value,
'inflow' AS flag1,
'financial' AS flag2
RESIDENT table
where value_type = inflow_financial;
JOIN LOAD
month,
value,
'outflow' AS flag1,
'operation' AS flag2
RESIDENT table
where value_type = outflow_operation;
JOIN LOAD
month,
value,
'outflow' AS flag1,
'financial' AS flag2
RESIDENT table
where value_type = outflow_financial;
In the bar chart you have the dimensions: month, flag1, flag2 and the expression is sum(value).
In the tab "design" you have to check stacked.
Regards vicky
Hi Vicky:
really appreciate for your answer, but after i tried your script, the system indicate there are some errors in it. so, i have uploaded the qv file and excel file and hope that you can illustrate the method in qlikview, many thanks to your help!!!!!
Hi Stefanie,
I have done it You only have to comment your "table" in and my table out, so you can see the result. I hope, you can change it to your data.
Have a nice day!
Vicky
Vicky!!! many thanks to your help!!!!
Have a nice day~!
Hi Vicky,
Here also some errors, when i put the following script in, the system always indicate is can't find them:
LOAD
month,
value,
'inflow' AS flag1,
'operating' AS flag2
RESIDENT table
where value_type = inflow_operating;
JOIN LOAD
month,
value,
'inflow' AS flag1,
'financial' AS flag2
RESIDENT table
where value_type = inflow_financial;
JOIN LOAD
month,
value,
'outflow' AS flag1,
'operation' AS flag2
RESIDENT table
where value_type = outflow_operation;
JOIN LOAD
month,
value,
'outflow' AS flag1,
'financial' AS flag2
RESIDENT table
where value_type = outflow_financial;
what's wrong with the script?
Hi Stefanie,
This script was only an example without having real field names. Use the script of the qvw in my last post, that's with your real names.
Before seeing your script, it was hard to know your datas. In our table there are your Inflow Operation, Inflow Finance, Outflow Operation and Outflow Finance all individual fields. In my case there is only one field for the value and one field that indicates the value. I think the where-clause doesn't work, because you haven't got a field with the four value_types.
And maybe your table name is another then "table".
Regards vicky