Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
arulsettu
Master III
Master III

problem in set analysis

hi

     i used this set analysis

TBAL_CAL_MONTH={$(=max(TBAL_CAL_MONTH)-6)}

its giving last six month value. ex if i select 12th month its showing 6th month value. but if i select 5th month it showing blank values

it should show last year 12th month value.

why its not showing  please clarify anyone?

thanks

23 Replies
arulsettu
Master III
Master III
Author

Hi Priya,

               please check the app is above in this thread

Anonymous
Not applicable

Arul ,

I assume you have date month filed as YYYYMM format (201503)

you can solve your problem in two way :

1.  If(Right(Max(TBAL_CAL_MONTH) – 1, 2) = '00', (Max(TBAL_CAL_MONTH) – 6) & '12', Max(TBAL_CAL_MONTH– 6))

other way and best way ,

You can create a master calendar in your script and do a preceding load for one column that is

(Year(Temp_Date) – 1) * 12 + Num(Month(Temp_Date)) as Preriod_ID


This formula will, for example, assign the value 24120 to

December 2009, and 24121 to January 2010, and so on.

Now you can simply use <PeriodID = {"$(=Max(PeriodID)-6)"}

Thanks

BKC

PrashantSangle

Hi,

try this for 

six month before value

sum({<datefield={"$(=date(AddMonths(datefield,-6)))"}>}TBAL_MTD_DR_LC_1-TBAL_MTD_CR_LC_1)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
arulsettu
Master III
Master III
Author

set analysis shows month difference like

12/1/2014 - 6/1/2014

but the current value and six month before values are same. i dont know why?

thank you all