Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
pirotfab
Creator
Creator

cumulative sales

Hello, I use this formula: sum (sales)

I have three info to search, (1) sales of the day, (2) sales of the month, and (3) salesof the year

fallowing the date, I wish that:

(1): displays the CA of the day (=> ok)

(2): displays the month's sales, cumulative from the 1st day of the month to the selected day

(3): displays the annual sales from 01/01 to the selected month.

Is it possible using the "inmonth" and "inyear" functions or with other types of functions?

thank you in advance for your help

4 Replies
arjakumar
Contributor III
Contributor III

Hi Fabien,

Please find the below expressions.

Sales of the day     sum(<${Date={Today()}}>total Sales)

Sales of the month       sum{<${Date={'>=$(=Monthstart(Today()))<=$(vSelectedDate)'}>total Sales}

vSelectedDate need to be passed through inputbox


Sales of Year sum{<${Date={'>=$(=Yearstart(Today()))<=$(=Month($(vSelectedDate)))'}>total Sales}

pirotfab
Creator
Creator
Author

Hi Arja,

This expression does not work

sum{<${Date={'>=$(=Monthstart(Today()))<=$(vSelectedDate)'}>total Sales}

thanks

arjakumar
Contributor III
Contributor III

Have you created vSelectedDate variable.

pirotfab
Creator
Creator
Author

Hi,

i find this expression with two variables

=sum({<date={">=$(=vFirstDayMonthDateSelect)"}*{"<=$(vDateSelect)"}>} sales)

=sum({<date={">=$(=vFirstDayYearDateSelect)"}*{"<=$(vDateSelect)"}>} sales)

Thanks

Fabien