Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
Not applicable

One field to 100% graph

Hi, I'm busy to build a chart with a cummul.

I will show my case with a simple example.

ID        Cat      Price

-----------------------------

1          A          50

2          B          10

3          C          20

4          D          30

Now my question: I want to make a line graph with Cat D (Category D) as 100%.
So Category A would be higher than 100%...

How can I fix this?
Should I make calculeted dimension, with a where statement where stands: Where Cat = D???

Please some help?

Regards,

1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: One field to 100% graph

You can add a variable, e.g vPriceD, as =sum({<Cat={'D'}>}Price). Then in your chart use Cat as dimension as before. As expression you can use sum(Price)/$(vPriceD). See attached example.


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
MVP & Luminary
MVP & Luminary

Re: One field to 100% graph

You can add a variable, e.g vPriceD, as =sum({<Cat={'D'}>}Price). Then in your chart use Cat as dimension as before. As expression you can use sum(Price)/$(vPriceD). See attached example.


talk is cheap, supply exceeds demand

View solution in original post

Not applicable

Re: One field to 100% graph

Maybe stupid question, where did you declare the variable 'vPriceD'?
I thought you must made the variables in the script?

Re: One field to 100% graph

Hi,

     Go to Settings -> Variable Overview.

Regards,

Kaushik Solanki

Regards,
Kaushik Solanki
Not applicable

Re: One field to 100% graph

Thanks Gysbert!