Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
Not applicable

How to work out a bar chart of sales per staff in Qlik sense?

Hi all,

I got 2 tables with

Table A recorded the sale:

      

MonthDistrictSub-districtCompany A SaleCompany B SaleCompany C Sale
Jan-16HKMid-level           257              989            500
Jan-16KOWLOONSHAM SHUI PO           166              387              50

And Table B recorded the no of staff

  

MonthDistrictSub-districtCompany A No of staffCompany B No of staffCompany C No of staff
Jan-16HKMid-level                                      187                                        416                                        109
Jan-16KOWLOONSHAM SHUI PO                                        56                                          81                                          11

And i use the month as the associated field for 2 tables. When i want to create a bar chart with the measure as sum(sales)/sum(no of staff) of each company, it works when no filter selection is chosen but it doesnt work if some selections of the filter panel of "month" and "district" is chosen?

May i ask what can i do in order to create the chart of sales per staff? thanks for answering

4 Replies
petter
Not applicable

Re: How to work out a bar chart of sales per staff in Qlik sense?

2017-01-09 11_48_20-Qlik Sense Desktop.png

The resulting table after running the load script would be:

2017-01-09 11_42_34-Qlik Sense Desktop.png

2017-01-09 12_25_33-Qlik Sense Desktop.png

petter
Not applicable

Re: How to work out a bar chart of sales per staff in Qlik sense?

Did it work for you? Or do you have additional questions? If not please mark the question as answered in order to close this thread.

Not applicable

Re: How to work out a bar chart of sales per staff in Qlik sense?

Thanks Petter. I think it can solve my problem and make me what is the best file structure for analysis and visualization. But im new to qlik sense actually and not very strong in scripting, i found that if in the data manager, i associated the 3 fields "Month", "District" and "Sub-district", i still can work out the sales per staff. How do you think about it?

petter
Not applicable

Re: How to work out a bar chart of sales per staff in Qlik sense?

Yes absolutely, as (almost) always there are multiple approaches to get your analysis to work in Qlik Sense. So yes getting a calculated/concatenated key between the two tables would work equally well and could be done either in Data Manager or in Load Script.