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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
chriscools
Creator II
Creator II

how to compare this month to the previous but only for the same first days

Hello,

i have i gauge chart in which i calculate sales of this month against previous month, with this formula:

if

( GetSelectedCount (month)>0,Sum({<Shop= {'Pomax Store Wijnegem'}, Year = {$(= Max(Year))}>}LineSalesAmount) ,
Sum({<Shop= {'Pomax Store Wijnegem'},  Year = {$(= Max(Year))}, Month={$(=month(max(Date)))}>}LineSalesAmount))/
Sum({<Shop= {'Pomax Store Wijnegem'},Month=, Monthnum={$(= max (Monthnum)-1)}>}LineSalesAmount)  

but then it gives me at this momen sales of 7 days of this month against 31 days last month, which at this moment is negative.

but how do i need to do it, if i only want to compare the 7 days of this month with the total of the first 7 days of last mont?

thanx!

chris

11 Replies
MayilVahanan

Hi

Day={'<$(vCurrentDay)'}

<8 .

so use <= instead of <

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
chriscools
Creator II
Creator II
Author

hello,

just closed down my computer, so i'll try this in the morning.

but that must be it...

thnx a lot!

chris