Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
trishita
Contributor III

How to incorporate date field in this current scrip

if (Match([Pensionseinrichtung],'HPK'), sum( total {$<Pensionseinrichtung={'HPK'}>} [HPV Buchwert]),

 

if (Match([Pensionseinrichtung],'HPR ALL'), sum( total {$<Pensionseinrichtung={'HPR ALL'}>} [HPV Buchwert]),

 

if (Match([Pensionseinrichtung],'HPR SMST'), sum( total {$<Pensionseinrichtung={'HPR SMST'}>} [HPV Buchwert]),

 

if (Match([Pensionseinrichtung],'HPR ZF'), sum( total {$<Pensionseinrichtung={'HPR ZF'}>} [HPV Buchwert]),'Unknown'

 

))))

 

I want to add a condition for a specific date given by the field Stichtag = 'Dez.2018'. How to incorporate this date field in this current script

1 Solution

Accepted Solutions

Re: How to incorporate date field in this current scrip

May be this

If(Match([Pensionseinrichtung], 'HPK'),
Sum(TOTAL {$<Pensionseinrichtung = {'HPK'}, Stichtag = {'Dez.2018'}>} [HPV Buchwert]), If(Match([Pensionseinrichtung], 'HPR ALL'),
Sum(TOTAL {$<Pensionseinrichtung = {'HPR ALL'}, Stichtag = {'Dez.2018'}>} [HPV Buchwert]), If(Match([Pensionseinrichtung], 'HPR SMST'),
Sum(TOTAL {$<Pensionseinrichtung = {'HPR SMST'}, Stichtag = {'Dez.2018'}>} [HPV Buchwert]), If(Match([Pensionseinrichtung], 'HPR ZF'),
Sum(TOTAL {$<Pensionseinrichtung = {'HPR ZF'}, Stichtag = {'Dez.2018'}>} [HPV Buchwert])
, 'Unknown'))))
2 Replies

Re: How to incorporate date field in this current scrip

May be this

If(Match([Pensionseinrichtung], 'HPK'),
Sum(TOTAL {$<Pensionseinrichtung = {'HPK'}, Stichtag = {'Dez.2018'}>} [HPV Buchwert]), If(Match([Pensionseinrichtung], 'HPR ALL'),
Sum(TOTAL {$<Pensionseinrichtung = {'HPR ALL'}, Stichtag = {'Dez.2018'}>} [HPV Buchwert]), If(Match([Pensionseinrichtung], 'HPR SMST'),
Sum(TOTAL {$<Pensionseinrichtung = {'HPR SMST'}, Stichtag = {'Dez.2018'}>} [HPV Buchwert]), If(Match([Pensionseinrichtung], 'HPR ZF'),
Sum(TOTAL {$<Pensionseinrichtung = {'HPR ZF'}, Stichtag = {'Dez.2018'}>} [HPV Buchwert])
, 'Unknown'))))
trishita
Contributor III

Re: How to incorporate date field in this current scrip

Thanks