Qlik Community

Ask a Question

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Qlik Highlights 2020 Giveaway! Watch, reply and have a chance to win a $200 Amazon Gift Card! Watch Video
cancel
Showing results for 
Search instead for 
Did you mean: 
Partner
Partner

Sum on different period

Hi all,

I have a dataset like this (for more countries /cities):

COUNTRYCITYPERIOD VALUE
ITALYROMEH1-20171
ITALYROMEH2-20172
ITALYMILANQ1-20173
ITALYMILANQ2-20174
ITALYROMEH1-20185
ITALYROMEH2-20186
ITALYMILANH1-20187
ITALYMILANH2-20188
..........

 

In a pivot like this:

COUNTRYINDEXPERIOD

 

I need to calculate  per each COUNTRIES

INDEX: SUM OF

 - ALL VALUE FOR ALL PERIODS LIKE 'Q*'.

- ALL H1-2017 VALUES FOR PERIOD H1-2018 and H2-2018

- ALL H1-2017 VALUES FOR H2-2017

and more

I've make a mapping table:

Q1-2017 --> Q1-2017

Q2-2017 --> Q2-2017

H1-2017 --> H1-2018

H1-2017 --> H2-2018

....

...

 

I can't use a IF solution, How make a formula like this?

 

0 Replies