Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView forum consolidation is complete. Labels are now required. LEARN ABOUT LABELS
cancel
Showing results for 
Search instead for 
Did you mean: 
shiryaev_alex
Contributor
Contributor

Overlapping periods

Dear colleagues!

I've got some problems with connecting data:
1. Managers and sales. Example:

Manager_history:

ManagerObjectManager_date_appointment
Alex123

26.10.2017

Nick12303.07.2018
Jack12401.08.2018
Ivan12515.10.2017
Alex12501.03.2018
Jack12513.07.2018

Sales:

ObjectSales_dateSales
12327.10.2017100
12330.11.2017150
12305.08.2018300
12306.08.2018200
12401.09.2018500
12413.10.2018340
12517.10.2017170
12519.10.2017

300

12502.04.2018650
12503.05.2018322
12511.08.2018432
12510.10.2018600

How can i get sales in the context of managers? (needed result below)

ManagerSum_sales
Alex100+150+650+322=1222
Nick300+200=500
Jack500+340+432+600=1872
Ivan170+300=470

2. Building stage and sales. The same data + stages of objects with interval dates such as:

ObjectBuilding_stageStage_startStage_end
123Foundation01.01.201604.08.2018
123Roof05.08.201801.10.2019
124Construction of floors01.01.201720.10.2018
125Foundation01.05.201613.12.2017
125Construction of floors14.12.201701.05.2018
125Roof02.05.201811.11.2019

The idea of needed results is the same (sales in the context of building stages):

Building_stageSum_sales
Foundation100+150+170+300=720
Construction of floors500+340+650=1490
Roof300+200+322+432+600=1854

I'll be grateful for all advice. Thanks a lot.

0 Replies