Qlik Community

Qlik DataMarket Discussions

Discussion Board for collaboration regarding Qlik DataMarket.

Not applicable

New user:Want to create a relative bar chart

@@@Hi,

I want to make a bar chart using selected filter. I have two column "Product" and "Value". So my requirement is when I select one product, the bar chart will show the value related to selected value as below.

 

ProductValueRelative to A
A101
B202
C303
D404
ProductValueRelative to B
A100.5
B201
C301.5
D402
ProductValueRelative to C
A100.333333333
B200.666666667
C301
D40

1.333333333

I want a bar chart with Product in X axis and relative value in Y-axis. I am new to qlik. Saw lot of video and tried using "GetFieldSelections" function. But I am not able to get how to do.

Thanks

Juthika

Message was edited by: juthika dash

Tags (1)
6 Replies
Highlighted

Re: New user:Want to create a relative bar chart

Use Product as dimension and two expressions:

  • Sum({<Product>}Value)
  • Sum({<Product>}Value)/Sum({<Product={'$(=only(Product))'}>}total Value)

Then when you select one product you'll see the ratios relative to that selected product.


talk is cheap, supply exceeds demand
Not applicable

Re: New user:Want to create a relative bar chart

Hi Gysbert,

Thank you for your reply. So you mean, Product as dimension and the two expression as measure?

If so, I tried, it did not work for me.

One more thing, for one product, i can have more values, so i have to take the mean of all the values.

Thanks

Juthika

Not applicable

Re: New user:Want to create a relative bar chart

I added 2 expressions. If i do not select any product, i can see only mean value(i expect that). But if i select a product, i can only see its mean value and relative value to itself(which is 1). But I want to see the relative value of other product as well.

Re: New user:Want to create a relative bar chart

Can you post the qlikview document that shows this behaviour? I can't reproduce it.


talk is cheap, supply exceeds demand
MVP
MVP

Re: New user:Want to create a relative bar chart

Try


=Sum({<Product>}Value)  / Sum({<Product={'$(=only(Product))'}>} TOTAL Value)

Product Sum({<Product>}Value) Sum({<Product>}Value) / Sum({<Product={'B'}>} TOTAL Value)
100 5
A100,5
B201
C301,5
D402
Not applicable

Re: New user:Want to create a relative bar chart

Thank you swuehl. That helps

Community Browser