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 Sales between Dates

Hi All,

I'm really struggling to sum the sales between two dates and was wondering if anyone could help and explain what I'm doing wrong.

So, I've got 5 fields, Customer, Start Date, End Date, CalendarMonthAndYear, Sales

*Start Date/EndDates will vary for each customer*

When adding the below calculated dimension, the result is as expected - Yes and No where it should be...

=if([Audit Sales End] > CalendarMonthAndYear and CalendarMonthAndYear >= [Audit Sales Start],'Yes','No')

I replicated this as an expression and changed the 'yes' to sum(sales) & removed 'no', but it's not providing the result I'm after.

I've since tried to adjust this as it appears that if isn't correct, and used something like this instead but it's still not correct

Sum(({<$CalendarMonthAndYear ={">=$([Start Date])<=$([End Date])"}>}, Sales)

Any help would be much appreciated, and it would be good to understand why what I have tried isn't working...

Thanks

Ben

1 Reply
vishsaggi
Champion III
Champion III

What is your CalendarMonthAndYear field format i mean what format is this field in it should match with your Start date and End date fields?