Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
hamdaniahmad
Contributor III
Contributor III

Comparing daily sales with different days amount

Hello all,

I'm sorry if this subject already discussed in another room.

I am trying to compare daily sales vs last month with this formula :

sum({<Date_Fix={">=$(=MonthStart(max({<DESC= {'SALES'}>}Date_Fix)))<=$(=max({<DESC= {'SALES'}>}Date_Fix))"}, [MODEL GR1]={"*"}-{'CBU','DEL'},year,month,date>}sales_qty)

The formula become problem when number of days in this month is smaller than last month (example : September days is 30 and August is 31).

I want, when we reach end of month in this month (30 September) is comparing with all quantity in August (30 Sept and 31 August).

and I also want we can select quantity by date.

anyone can help me in this problem? Than you very much

2 Replies
tresesco
MVP
MVP

You could use Monthend() to get the right date dynamically for any month.

hamdaniahmad
Contributor III
Contributor III
Author

Thank you for your response, if I use Monthend() I cannot dynamically choose date (from..to..) the date always show at end of month.