Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
raju_salmon
Creator II
Creator II

Bar chart shared value

Hi,

I have 3 employees sales data. I need to show a bar chat with

Sum({<EMP={1}>}Sales)     - $2000

Sum({<EMP={2}>}Sales)     - $3000

Sum({<EMP={3}>}Sales)     - $5000

Assume above information is for one month. My dimension is month.

I have a requirement to show a bar chart where it should show Y axis from 0% to 100% (like 0%, 20%,40%,60%,80%,100%)

and Emp 1 share is 20%, Emp 2 share is 30% and Emp 3 share is 50% (based on above values).

Can we achieve this with bar chart? if yes, may i know how can we do this?

Thanks for your help.

1 Solution

Accepted Solutions
raju_salmon
Creator II
Creator II
Author

Thanks guys...Got self solution...

Sum({<EMP={1}>}Sales)

/

(Sum({<EMP={1}>}Sales)+Sum({<EMP={2}>}Sales)+Sum({<EMP={3}>}Sales))

Same for next two expressions...

View solution in original post

6 Replies
Kushal_Chawda

Dimension :

Month

Expression:

=num(Sum({<EMP={1}>}Sales) / Sum(Total Sales),'#0.00%')

num(Sum({<EMP={2}>}Sales) / Sum(Total Sales) ,'#0.00%')  

num(Sum({<EMP={3}>}Sales) / Sum(Total Sales),'#0.00%')

Go to Properties-> Style -> Check Stack

Not applicable

you can show this :

dimension is  EMP

expression : Sum({<EMP={1}>}Sales) mark as relative

                    Sum({<EMP={2}>}Sales) mark as relative

                    Sum({<EMP={3}>}Sales) mark as relative

select % for the 3 expressions in the numbers tab

raju_salmon
Creator II
Creator II
Author

Thanks guys...Got self solution...

Sum({<EMP={1}>}Sales)

/

(Sum({<EMP={1}>}Sales)+Sum({<EMP={2}>}Sales)+Sum({<EMP={3}>}Sales))

Same for next two expressions...

Kushal_Chawda

It's better to use Sum(Total Sales), instead summing up 3 expressions, which means evaluating 3 different expressions.

raju_salmon
Creator II
Creator II
Author

Hi Kushal,

I need to see this share between only these employees. If new emp added it causes issue. So... hope u got my point.

Thanks for your time.

Kushal_Chawda

Ok then use single expression

Sum({<EMP={'1','2','3'}>}Sales)