Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

viveksingh
Contributor II

need help in making a Bar chart that looks like funnel

Hi Experts,

I have a unique requirement like i want to show the bar chart which looks like funnel.

please see attached image below. bar.png

I want only orange colored bars. lets forget about the percentages that are coming after bar vale in  white colored.

If you closely observe the above image , the bar size is same for all vales but based on the value the orange color highlights it.

Can any one help in achieving this ?

1 Solution

Accepted Solutions
vinieme12
Esteemed Contributor II

Re: need help in making a Bar chart that looks like funnel

See attached

barchart_sample3.PNG

11 Replies
vinieme12
Esteemed Contributor II

Re: need help in making a Bar chart that looks like funnel

*** slight correction in expression

barchart_sample.PNG

MVP
MVP

Re: need help in making a Bar chart that looks like funnel

You will have to perform a bit of a hack here, and I'm not sure quite how it will look.  The hover text will not be right as a result either.  However...

You could create a dimension for positive and negative, using an inline table:

LOAD

     SplitBar

INLINE [

SplitBar

0.5

-0.5

];

Then in your chart, add SplitBar as a dimension and in the properties choose to stack it.  As the SplitBar dimension is a data island you will get your value stacked on top of itself.  If you then change the expression like this:

( ... Your current expression here ...) * SplitBar

This should then have half of the value to the right of the axis and half to the left.

Another option may be to always stack to 100%, again using a data island.  Try like this:

LOAD

     StackBar

INLINE [

StackBar

-1

0

1

];

Again, add the data island expression as a dimension and stack your bar, and sort by the new dimension.

Then have an expression like:

if(StackBar = 0, (... Your current expression ...), (1 - (... Your current expression ...)) / 2)

This should give you two wedges which are the grey bits and then then main chunk in the middle.

You will need to add a colour by expression to set the colours based on the value of StackBar.

The second solution will give better results on the hover text.

I've not tried either approach, it's all in my head, so your mileage may vary.  Hopefully it points you in the right direction though.

(Incidentally, if I was given this as a requirement, I would probably say "No. You can have all your bars starting at zero.".  But then, that's just me.)

Cheers,

Steve

vinieme12
Esteemed Contributor II

Re: need help in making a Bar chart that looks like funnel

The above chart has One Dimension and Three Expressions( Stacked Barchart)

Expression1

     (1- (sum(Amount) / Max(TOTAL AGGR(Sum(Amount),Category))))*.5

Expression 2

dual(Num(sum(Amount),'#.##0,00 $;-#.##0,00 $'),

sum(Amount) / Max(TOTAL AGGR(Sum(Amount),Category)))

Expression 3

          (1- (sum(Amount) / Max(TOTAL AGGR(Sum(Amount),Category))))*.5

viveksingh
Contributor II

Re: need help in making a Bar chart that looks like funnel

Hi Vineeth,

Thanks for the reply.

when I changed the expression with new expression that you provided, it is not showing correctly.

Below is the image

bar _comm.PNG

vinieme12
Esteemed Contributor II

Re: need help in making a Bar chart that looks like funnel

there should be 3 expressions!

post your app please

viveksingh
Contributor II

Re: need help in making a Bar chart that looks like funnel

Hi,

Below is attached one.

vinieme12
Esteemed Contributor II

Re: need help in making a Bar chart that looks like funnel

it's missing brackets

    (1- (sum(Amount) / Max(TOTAL AGGR(Sum(Amount),Category))))*.5

viveksingh
Contributor II

Re: need help in making a Bar chart that looks like funnel

still same... no change. it is showing only two expression in chart.

Can you please post the updated app.

Thanks in advance

viveksingh
Contributor II

Re: need help in making a Bar chart that looks like funnel

Hi all,

can any one please look into this?