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: 
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
Gysbert_Wassenaar

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
Gysbert_Wassenaar

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?

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

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!