Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Lionel_Maximus
Contributor III
Contributor III

Month To Date Sales

Hello,

I want to calculate the Current Month(Max Month) Sales to Previous Month Sales.  I have Max 11 Days in current Month.So the comparison will be between 11 days sale of current month to 11 days sale of previous Month.

I've made the following expression for Current Month.

Sum({$<Month={"=$(=Month(Max(VDate))-1)"},Day={"<=$(=Day(Max(VDate)))"}>}Sales)

and this is for previous Month.

Sum({$<Month={"Month(Max(VDate))"},Day={"<=Day(Max(VDate))"}>}Sales)

Whenever i select any date e.g. 10/11/2018 it should return Current Month Sales: From 10/1/2018 - 10/11/2018 and Previous Month Sales: From 09/1/2018 - 09/11/2018.

But it is not showing any thing in the Current Month :/.

Can someone please tell me what the problem is??

Regards

1 Reply
pradosh_thakur
Master II
Master II

Try this may be to get the sales for previous month 11 days
Sum({$<Month={"$(=AddMonth(Max(VDate),-1))"},Day={"<=$(=Day(Max(VDate)))"}>}Sales)
Learning never stops.