Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for
Did you mean:
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???

Regards,

1 Solution

Accepted Solutions

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
4 Replies

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
Not applicable
Author

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

Hi,

Go to Settings -> Variable Overview.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Thanks Gysbert!

Community Browser