Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
in Qliksense
Current Month October
TTM ( trailing twelve months)—Since we are in Oct 2017 then it will start from Oct 2017 back to Nov 2016
PTTM (Previous trailing twelve months)--- Since we are in Oct 2017 then it will start from Oct 2016 back to Nov 2015
Set Analysis ( TTM) , there is a field called MonthIndex ( Year*12 +Month) using this field I have subtracted 12 to give me the bucket values of TTM & PTTM
Sum( {<MonthIndex = {"$(='>' & $(vFixedTTM) & '<=' & $(vFixedMonthIndex))"} >} SalesAmount)
Issue or What customer is expecting :
If you see above screen shot the line is the issue, in the sorting we can do either January to December or December to January. But customer wants the sorting to be as shown in the table on the left Start from the current month to end of TTM. If Customer picks June then it should start from June to July
Please let me know if you need any additional info
Sunny in the dimension field Month can only be present because its a physical month and not year. And i reason i cannot use date as the dimension is because its fiscal Month ( starts on monday and ends on Sunday)
I am not asking you to change your dimension... all I am asking is to use a sorting expression like this
=Max({<MonthIndex = {"$(='>' & $(vFixedTTM) & '<=' & $(vFixedMonthIndex))"}>} MonthYear)
or
=Max({<MonthIndex = {"$(='>' & $(vFixedTTM) & '<=' & $(vFixedMonthIndex))"}>} MonthIndex)
Do you want me to post a QlikView sample I prepared?