Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to display Bar Chart based on expression values

Dear all,


In my grouped bar chart 2 exps are there,and my requirement is to display in one  chart  when exp1 > exp2 values only .and in other chart when exp 1< exp2 values only.


Could you advise as to how I could achieve the above?


Thanks,

Shekar

10 Replies
Not applicable
Author

Hi Shekar,

Why don't you use the same chart with

if(expr1 > expr 2, expr1, expr2)

chris

Not applicable
Author

Hi ,

if(expr1 > expr 2, expr1, expr2) then only one exp value will get display .

But i need to display both values in the chart.

Like in one chart Gross vs Net values for a dimenison where Net > Gross and in other chart Gross Vs Net for a dimension when Gross > Net.

vardhancse
Specialist III
Specialist III

hi can you try to multiple if conditions like

if 1 condition was satisfied, then exp 1,

if 2nd condition was satisfied, then exp 2

Not applicable
Author

Shekar

then make 2 grpahs with

if(expr1 > expr 2, expr1)  for one

if(expr2 > expr 1, expr2) for the other

chris

vardhancse
Specialist III
Specialist III

Hi,

For grouped chart it should have min 2 expressions.

Not applicable
Author

Hi,

But i have to display both exp in both the charts like when exp1>exp2 then exp1 & exp2 both values in one chart and when exp1<exp2 then exp1& exp2 both values in other chart.

Thanks,

Not applicable
Author

OK so

in Graph 1

expr 1 :  if (expr 1 > expr 2, expr 1)

expr 2 :  if (expr 1 > expr 2, expr 2)

in Graph 2

expr 1 :  if (expr 2 > expr 1, expr 1)

expr 2 :  if (expr 2 > expr 1, expr 2)

chris

Not applicable
Author

Have you considered using the "Show - Conditional" option on the Layout tab for the charts?

On one chart, you can enter =if(exp1>exp2,1,0) and on the second you can enter =if(exp1<exp2,1,0) as your conditional show expressions...

Would this work for your purpose?

Not applicable
Author

Hi Christianj,

Thanks for your quick reply,its working as expected.

Thanks,

Shekar