Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Read about the latest Qlik Community enhancements on the Community News blog!
cancel
Showing results for 
Search instead for 
Did you mean: 
zenobendi
Contributor III
Contributor III

Set relative and absolute value in stack bar chart

Hi,

I have a problem using 4 expressions in a bar chart. So I have 4 expressions like:

=Count(DISTINCT(SPORD))

=(sum(IF(SPANN=ANNO AND (SPMES<MESE OR SPMES=MESE AND SPGIO<=GIORNO),SPVAL_FATBOL)))

=Count(DISTINCT(SPORD))

=(sum(IF(SPANN=ANNO AND (SPMES<MESE OR SPMES=MESE AND SPGIO<=GIORNO),SPVAL_FATBOL)))

I have created 4 expressions because the first two show relative values while the other two show absolute values. I want the graph to show the relative values in bars, while the absolute values as values on data points. As you see in the image the chart shows the absolute and relative value for the expression SUM.... but it shows only the relative value for the expression COUNT. 

2 Replies
zenobendi
Contributor III
Contributor III
Author

 
zenobendi
Contributor III
Contributor III
Author

Is there someone who can help me? Because I've searched in the forum and I've tried to use this expression, but it doesn't solve my problem.

=dual(Num(Count({<SPTYP_GRUPPO = >} DISTINCT(If(SPTYP_GRUPPO='Fatturato e Bollato' and SPANN=ANNO AND SPMES<MESE OR SPMES=MESE AND SPGIO<=GIORNO, SPORD))),'#.##0') & '(' & Num((Count({<SPTYP_GRUPPO = >} DISTINCT(If(SPTYP_GRUPPO='Fatturato e Bollato' and SPANN=ANNO AND SPMES<MESE OR SPMES=MESE AND SPGIO<=GIORNO, SPORD))))/(Count({<SPTYP_GRUPPO = >} Total DISTINCT(If(SPTYP_GRUPPO='Fatturato e Bollato' and SPANN=ANNO AND SPMES<MESE OR SPMES=MESE AND SPGIO<=GIORNO, SPORD)))),'#.##0%') & ')',Count({<SPTYP_GRUPPO = >} DISTINCT(If(SPTYP_GRUPPO='Fatturato e Bollato' and SPANN=ANNO AND SPMES<MESE OR SPMES=MESE AND SPGIO<=GIORNO, SPORD))) +(Count({<SPTYP_GRUPPO = >} DISTINCT(If(SPTYP_GRUPPO='Fatturato e Bollato' and SPANN=ANNO AND SPMES<MESE OR SPMES=MESE AND SPGIO<=GIORNO, SPORD))))/(Count({<SPTYP_GRUPPO = >} Total DISTINCT(If(SPTYP_GRUPPO='Fatturato e Bollato' and SPANN=ANNO AND SPMES<MESE OR SPMES=MESE AND SPGIO<=GIORNO, SPORD))))*100 )

Thanks