# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for
Search instead for
Did you mean:
Contributor III

## DSum in qlikview

I have this table in qlikview:

 DATE PROJECTCODE REVENUES COSTS 31/12/2018 3078 1000 900 31/12/2018 3126 1100 990 31/12/2018 3149 1210 1089 31/12/2018 3169 1452 1306,8 30/06/2019 3078 1597,2 1437,48 30/06/2019 3126 2395,8 2156,22 30/06/2019 3149 2635,38 2371,842

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

 DATE 30/06/2019 30/06/2019 31/12/2018 31/12/2018 revenues 2019vs2018 costs 2019vs2018 PROJECTCODE Sum(REVENUES) sum(COSTS) Sum(REVENUES) sum(COSTS) 3078 1597,2 1437,48 1000 900 597,2 537,48 3126 2395,8 2156,22 1100 990 1295,8 1166,22 3149 2635,38 2371,842 1210 1089 1425,38 1282,842 3169 0 0 1452 1306,8 -1452 -1306,8 6628,38 5965,542 4762 4285,8 1866,38 1679,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
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])

2 Replies
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 😞  😞

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])

Community Browser