Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Display barchart expression

hi all,

Can we display bar chart with two calculation in a single expression. I had taken DEFECT as dimension.

DEFECT field contains rows as Chip, EdgeTear,Hole, etc.

Now i want to dispaly two calculations in a single expression.

i.e;

Sum(TPD) and

Sum(LC)-Sum({$<DEFECT='FAIL'> TPD}

All the defect rows should show its values based on first calculated expression each bar for Chip,EdgeTear,Hole,etc. and last bar should show based on second calculated expression.

Thanks in advance.

Regards,

Venkat.

6 Replies
whiteline
Master II
Master II

Hi.

You can use if() if you know the condition for the last bar.

Not applicable
Author

hi thanks for your reply on this,

There is no condition, every time the last bar column should display and value of that bar should change based on filters selection.

Please find the attached app.

Thanks in advance.

Regards,

venkat

Anonymous
Not applicable
Author

Hi ,

     Better you can use the Combo Chart for your requirement and i attached the your qv file with combo chart.

     Hope it wil help

Regards

Ashok.

Not applicable
Author

Hi thanks for reply but this app not used to me bcoz i need to maintain only bar chart and single expression should display two calculated conditions.

is this possible ?

Thanks in advance.

Regards,

Venkat.

Anonymous
Not applicable
Author

Hi,

     Hope its not possible to create two bar chart using single expression. For this you can use Stacked bar but here also you can use two expression but the result should show in single bar in stacked.

Regards

Ashok.

whiteline
Master II
Master II

Ok, if the user select three values from DEFECT dimension, the expression are:

Chip -> Sum(TOTALPERDEFECT)

Chip/Tear -> Sum(TOTALPERDEFECT)

Curl ->sum(LENSCOUNT)-Sum({$<DEFECT={'FAIL'}>}TOTALPERDEFECT)

Right ?

If so, the good thing is that you could use =if(rowno()=NoOfRows(), Expression1, Expression2)

The bad thing is it seems NoOfRows() in QV11 returns +1 (counts total row).