Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
arulsettu
Master III
Master III

getting wrong value in set analysis

HI,

     to get last six month value i got this code from experts

Sum({$<ACNT_FLEX_02={'Balance Sheet'},datefield={">=$(=date(Addmonths(max(datefield),-6)))<=$(=date(max(datefield)))"}>}TBAL_MTD_DR_LC_1-TBAL_MTD_CR_LC_1)

when implement for example if i select 2014 12th month it show 2014 6th month. up to this correct. but the value for the last six month is same as the current value. there is no difference.

please some one clarify its really emergency...

thanks

18 Replies
arulsettu
Master III
Master III
Author

output is if i choose 2014 and 12th month TBAL_COMP_CODE=001

Cash and cash equivalents                                                      

784202429

this is the expecting result

plz anyone check it

Not applicable

hi ,

check this app.

may be helpful.

Regards

Vimlesh

arulsettu
Master III
Master III
Author

hi in this app u your having date field but in my case i am having only year and month field

arulsettu
Master III
Master III
Author

any suggestions plz its emergency.....

Not applicable

hi,

I have sent you last app .in which i have used nummonth and year two fields (ignore date fields).

=Sum({$<Date=,Fin_Year=, nummonth={">=$(=vminmonth )<=$(=vmaxmonth)"}>}Value)

variables= >>>   vminmonth=nummonth-12

                              vmaxmonth=nummonth-6

Regards

Vimlesh

arulsettu
Master III
Master III
Author

this i done

=Sum({$<TBAL_CAL_MONTH=,TBAL_CAL_YEAR=, datefield={">=$(=date(Addmonths(max(datefield),-12)))<=$(=date(Addmonths(max(datefield),-6)))"}>}TBAL_MTD_DR_LC_1-TBAL_MTD_CR_LC_1)

it shows value between 1/1/2014 to 6/1/2014

arulsettu
Master III
Master III
Author

ya but i choose month 2 means max(month) goes in negative so i get blank values

arulsettu
Master III
Master III
Author

in my sample app values calculating 1 to 6th month i need to calculate 0th value in month also so i did this

=sum({<ACNT_FLEX_02={'Balance Sheet'},TBAL_CAL_MONTH={'0'}>}TBAL_MTD_DR_LC_1-TBAL_MTD_CR_LC_1)+Sum({$<TBAL_CAL_MONTH=,TBAL_CAL_YEAR=,ACNT_FLEX_02={'Balance Sheet'}, datefield={">=$(=date(Addmonths(max(datefield),-11)))<=$(=date(Addmonths(max(datefield),-6)))"}>}TBAL_MTD_DR_LC_1-TBAL_MTD_CR_LC_1)

if any mistake please correct me. using this code i didnt get correct answer

arulsettu
Master III
Master III
Author

HI shusil,

               can you suggest some idea please

thanks