Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

cancel
Showing results for 
Search instead for 
Did you mean: 
maxronny
Contributor III
Contributor III

DSum in qlikview

I have this table in qlikview:

DATEPROJECTCODEREVENUESCOSTS
31/12/201830781000900
31/12/201831261100990
31/12/2018314912101089
31/12/2018316914521306,8
30/06/201930781597,21437,48
30/06/201931262395,82156,22
30/06/201931492635,382371,842

 

i wanna obtain this issue (see the red columns):

DATE30/06/201930/06/201931/12/201831/12/2018 revenues 2019vs2018costs 2019vs2018
PROJECTCODESum(REVENUES)sum(COSTS)Sum(REVENUES)sum(COSTS)   
30781597,21437,481000900 597,2537,48
31262395,82156,221100990 1295,81166,22
31492635,382371,84212101089 1425,381282,842
31690014521306,8 -1452-1306,8
        
 6628,385965,54247624285,8 1866,381679,742

 

I tried with this formula

sum(TOTAL<[DATE]='30/06/2019'>[REVENUES])- sum(TOTAL<[DATE]='31/12/2018'>[REVENUES])

but doesn't run... 😞

please find qvw file attached.

any suggestion?

thank you in advance.

1 Solution

Accepted Solutions
maxronny
Contributor III
Contributor III
Author

I FOUND THE SOLUTION!!!!

If you want to have the DSUM result in qlik you have to write the formula like this:

=Sum({<[DATE] = {'31/12/2018'}>} [REVENUES])

View solution in original post

2 Replies
maxronny
Contributor III
Contributor III
Author

the same problem changing the formula:

if([DATE]='30/06/2019',sum([REVENUES]))-if([DATE]='31/12/2018',sum([REVENUES]))

doesn't run 😞  😞

maxronny
Contributor III
Contributor III
Author

I FOUND THE SOLUTION!!!!

If you want to have the DSUM result in qlik you have to write the formula like this:

=Sum({<[DATE] = {'31/12/2018'}>} [REVENUES])

View solution in original post