Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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')