Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Here’s the question I had about qlikview. I want to calculate Previous YTD (Same time frame as the current year) however, whenever I reload my data, the Prev YTD column stays static and the current year data changes based on the new data.
I expect the Prev YTD column to look back in time and fetch data for the same time frame as last year and keep accumulating each time I reload data.
I'm using something like below , but looks like it's not working.
=SUM({$<SalesDate={'>=$(=AddYears(YearStart(Today()),-1))<=$(=AddYears(Date(Today()),-1))'}>}InvoiceSales)
Any suggestions?
Regards,
AS
Guys any suggestion?
Regards,
AS
May be try this
=Sum({$<SalesDate = {">=$(=Date(YearStart(Today(), -1), 'DateFieldFormatHere'))<=$(=Date(AddYears(Today(), -1), 'DateFieldFormatHere'))"}>} InvoiceSales)
Hi Sunny,
I tried below:
=Sum({$<SalesDate = {">=$(=Date(YearStart(Today(), -1), 'M/D/YYYY'))<=$(=Date(AddYears(Today(), -1), 'M/D/YYYY'))"}>} InvoiceSales)
Sorry no luck!
Regards,
AS
=Sum({$<SalesDate = {">=$(=Date(YearStart(max(SalesDate), -1), 'M/D/YYYY'))<=$(=Date(AddYears(max(SalesDate), -1), 'M/D/YYYY'))"}>} InvoiceSales)
Are you making a selection in the year field or yearmonth or something related?? May be try this
=Sum({$<SalesDate = {">=$(=Date(YearStart(Today(), -1), 'M/D/YYYY'))<=$(=Date(AddYears(Today(), -1), 'M/D/YYYY'))"}, Year, Month, MonthYear, Quarter, QuarterYear>} InvoiceSales)
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others