Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello all ,i was going through few of our community posts ,where i found this statement ,please can anyone explain me how does it works and the agenda for this statment thank you
Sum(if(InYearToDate([Invoice Date], MakeDate($(=Max(InvoiceYear)), Month(Today()), Day(Today())), 0), Sales))
This statement is just checking if invoice date comes under the max year's today's day and month, then sum sales.
For example if you have data like this:
The InYeartoDate will evaluate like this (Max(Invoice Year) = 2015
-1 (True)
So the
Sum(If(InYearToDate([Invoice Date], MakeDate($(=Max(InvoiceYear)), Month(Today()), Day(Today())), 0), Sales) = 50
I hope this helps. To learn about InYearToDate() function see the below screenshot from QlikView's help page: