Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
i have a tabel to compare sales of this month, last month, and this month last year.
but if i don't choose a month, than it gives me the sales for the total year.
how would i have to do it that if no month is selected only last month is chosen?
this is the formula i have
Sum({<Shop= {'Pomax Store Wijnegem'}, Year = {$(= Max(Year))}>}LineSalesAmount)
and i tried this: (in analogy with the max year)
Sum({<Shop= {'Pomax Store Wijnegem'}, Year = {$(= Max(Year))} Month= {$(=Max(Year))}>}LineSalesAmount)
but then i don't get my calculation at all!
what am i doing wrong?
thanx!
chris
Thank you very much!
this works! could you perhaps tell me what i was doint wrong, or why this is working?
thanx!
chris
Hello,
why do you ask about the MonthYearField? i have it in the calendar.
would it be better to use that , and if so why?
grtz
Hi, you're welcome!
I'm not sure but I think that using max function, QV doesn´t asociate the number got with max() to field Month, so I use month(max(Date)) to get the month name.
Also, I saw that selecting a MonthYear, the selection didn´t get values for your table, but as you can see, in the expression we are using two fields to select a year and a month, that's why I wanted to use MonthYear instead using two fileds for the same selection.
Regards