Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
nboccassini
Partner - Creator
Partner - Creator

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