Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

Not applicable

Calender and Switch between Sales and turnover

I try to get a evaluation table, where I can switch between turnover (€) and sales volume (pcs). If one month is selected on the calendar, the value (turnover or sales volume) should be calculated YTD of the selected month. If several months are selected, the value should contains the selected months. The whole should be performant possible. The following formula works only with the function to switch between turnover and sales and select one month. Unfortunately this solution makes QV very slow:

SUM
(
if (GetSelectedCount (MONTHCALENDER) =1,
(
if(InYeartoDate(DATE, MONTHCALENDER, 0), (If (VARIABLE = 'TURNOVER',S_TURNOVER,if (VARIABLE = 'SALES' ,S_SALES))))),
(
If (VARIABLE = 'TURNOVER',S_TURNOVER,if (VARIABLE = 'SALES' ,S_SALES)))))

MONTHCALENDER:

30.11.2014

31.12.2014

31.01.2015

28.02.2015

31.03.2015

30.04.2015

VARIABLE:

SALES

TURNOVER

Month

Variable

Month

Variable

Jan

20

Jan

20

Feb

25

Feb

25

Mrz

22

Mrz

22

Apr

30

Apr

30

May

35

May

35

Jun

31

Jun

31

Jul

28

Jul

28

Aug

34

Aug

34

Sep

26

Sep

26

Oct

25

Oct

25

Nov

48

Nov

48

Dez

14

Dez

14

Tags (2)
1 Reply
rupe
Valued Contributor

Re: Calender and Switch between Sales and turnover

Why not create 2 seperate tables with much simpler rules.

When multiple months are selected make the non-YTD chart invisible and the YTD chart visible, and when a single month is selected make the non-YTD chart visible and the YTD chart invisible.

I think that this will improve performance as well as the expressions will be simpler to manage.

Community Browser