Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to make LYTD

Hello

to make YTD

i did

AutoNumberHash128(YEAR & MONTH ) AS MONTHYEAR

in the calendar

and after that

=num(SUM({<MONTHYEAR={"<=$(=Max(MONTHYEAR))"}, AÑOFISCAL=,  RECURSO=>}DCVC_TOTR_LOC_CIMP) / 1000,'#.##0 M')

but how i can do LYTD ? i put a -12 in the monthyear but it didn't work

thanks!

3 Replies
Anonymous
Not applicable
Author

try autonumber() instead of autonumberhash() and ensure that monthyear is sorted ascending... before applying autonumber

sunny_talwar

May be this

=Num(Sum({<MONTHYEAR = {"<=$(=Max(MONTHYEAR) -12)"}, AÑOFISCAL = {$(=Max(AÑOFISCAL)-1)},  RECURSO= >} DCVC_TOTR_LOC_CIMP)/1000, '#.##0 M')