Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
viveksingh
Creator III
Creator III

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
Champion III
Champion III

See attached

barchart_sample3.PNG

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

13 Replies
vinieme12
Champion III
Champion III

*** slight correction in expression

barchart_sample.PNG

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

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
Champion III
Champion III

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

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
viveksingh
Creator III
Creator III
Author

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
Champion III
Champion III

there should be 3 expressions!

post your app please

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
viveksingh
Creator III
Creator III
Author

Hi,

Below is attached one.

vinieme12
Champion III
Champion III

it's missing brackets

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

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
viveksingh
Creator III
Creator III
Author

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

Can you please post the updated app.

Thanks in advance

viveksingh
Creator III
Creator III
Author

Hi all,

can any one please look into this?