Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum over the records


Hi,

I have two dates in a table:Date1 and Date2. I want to sum Revenue in the chart using Date1 as a dimension but over the all the records where Date2 = Date1 (kind of  parent ). Can someone help with this?

thank you,

Olivera

5 Replies
Anonymous
Not applicable
Author

Sum(if(date1=date2,amount))

Not applicable
Author

Hi,

this is the sum over the range of records. Date 2 and Date 1 will not be the same for the same record, but Date 1 in one record might be equal to Date 2 in some other record

Not applicable
Author

Hi,

Try like this

Create a Temparory Table having Date2 field and rename it to Date1. Then concatenate the TempTable with main table which is having only Date1 then create the the chart

Select * from Table;

concatenate

TempTable:

Load Date2  as Date1,Revenue resident Tablename;

Regards

Harsha Nandan

Not applicable
Author

Thank you,

yes that is one of the solutions but I thought that it might be done with some formula on front end,

Olivera

ramoncova06
Specialist III
Specialist III

best solution is on doing this at script level, it would allow a better performance, doing those kind of if's can consume a lot of cpu