9 Replies Latest reply: Jan 31, 2018 2:51 AM by omar bensalem

# stacked bar in qliksense

Hi all,

I would need help on the stacked bar chart in qliksense.

I have 3 columns of data i.e Department, Revenue Original, Revenue Estimated.

Now i have to calculate revenue ratio i.e revenue original / revenue estimated -

who calculate the percentage (revenue original/revenue estimate) / total of both sum and if the ratio is <1 make it revenue failure if not revenue failure.

and we need to count the number of revenue failure and revenue pass percentage.

those percentage graph should be on bar chart .

• ###### Re: stacked bar in qliksense

sthing like this?

or sthing like this:

• ###### Re: stacked bar in qliksense

Second style but inside the bar percentages are needed- can you please share it

• ###### Re: stacked bar in qliksense

You cannot have the percentage inside of the bars in the native bar chart of qlik.. maybe an extension would allow it (see this one : Qlik Branch )

as for the expressions used:

dim:

Department

measures:

Sum([Revenue Original]) / (sum({<Department>}[Revenue Estimated])+sum({<Department>}[Revenue Original]))

Sum([Revenue Estimated]) / (sum({<Department>}[Revenue Estimated])+sum({<Department>}[Revenue Original]))

• ###### Re: stacked bar in qliksense

have u tried using the 2 expressions?

• ###### Re: stacked bar in qliksense

yes but the logic i need is count of % <1 and count of % >1
i need to have those

• ###### Re: stacked bar in qliksense

maybe

count({<Department={"=(Sum([Revenue Original]) / sum([Revenue Estimated]))>1"}>}Department)

count({<Department={"=(Sum([Revenue Original]) / sum([Revenue Estimated]))<=1"}>}Department)