Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

Year Month

Hi Friends

I have attached a QVW file and the supporting work sheet. I want your help to do the following

1.Create master Calender with Year_Month as field

2. When I select an Year_Month that particular month should be the 1st Column of the Pivot table other months  after that

Eg : If I select 2013_05 as Year_Month my pivot table should look like as follows

YEARMONTHMAYJUNJULAUGSEPOCTNOVDECJANFEBMARAPR
201315,332,7994,778,4755,820,4514,327,2084,492,2975,708,3825,472,0655,573,4704,122,2705,139,5206,129,3304,060,620
201325,332,7994,778,4755,820,4514,327,2084,492,2975,708,3825,472,0655,573,4704,122,2705,225,0416,129,3304,060,620
201335,332,7994,778,4755,820,4514,327,2084,492,2975,708,3825,472,0655,573,4704,122,2705,225,0415,436,1994,060,620
201345,332,7994,778,4755,820,4514,327,2084,492,2975,708,3825,472,0655,573,4704,122,2705,225,0415,436,1993,911,853
201355,017,3814,778,4755,820,4514,327,2084,492,2975,708,3825,472,0655,573,4704,122,2705,225,0415,436,1993,911,853
201365,017,3813,978,7195,820,4514,327,2084,492,2975,708,3825,472,0655,573,4704,122,2705,225,0415,436,1993,911,853
201375,017,3813,978,7194,813,1784,327,2084,492,2975,708,3825,472,0655,573,4704,122,2705,225,0415,436,1993,911,853
201385,017,3813,978,7194,813,1784,772,9334,492,2975,708,3825,472,0655,573,4704,122,2705,225,0415,436,1993,911,853
201395,017,3813,978,7194,813,1784,772,9335,844,2025,708,3825,472,0655,573,4704,122,2705,225,0415,436,1993,911,853
2013105,017,3813,978,7194,813,1784,772,9335,844,2024,616,7795,472,0655,573,4704,122,2705,225,0415,436,1993,911,853
2013115,017,3813,978,7194,813,1784,772,9335,844,2024,616,7794,843,3275,573,4704,122,2705,225,0415,436,1993,911,853
2013125,017,3813,978,7194,813,1784,772,9335,844,2024,616,7794,843,3273,715,3684,122,2705,225,0415,436,1993,911,853
2013Total61,470,24551,743,404############59,315,184######64,407,304######49,467,24262,614,97366,620,65247,388,537

Pls help me to solve the issue. If You can write the script in my document so much the better

Thanks in advance

17 Replies
rajat2392
Partner - Creator III
Partner - Creator III

here is the solution for this problem..see the attached files....

Pls don't forget to mark it as correct if u are satisfied with the solution....

MarcoWedel

@QlikCommunity moderator:

why is my first answer to this thread still in moderation status and thus invisible to the OP?

MarcoWedel

@QlikCommunity moderator:


I still would appreciate an explanation as to why my post triggered the moderation function ...

upaliwije
Creator II
Creator II
Author

Hi Rajat

Thanks a lot for your help


sum({1}$(=Upper(Month(AddMonths(MakeDate(SubField(Year_Month,'_',1), SubField(Year_Month,'_',2)),0)))))

Now I want to modify the above expression to show data relating to selection made. Eg If I select Year as 2013 only the following records should be shown. Pls help me

YEARMONTHJAN_NRPFEB_NRPMAR_NRPAPR_NRPMAY_NRPJUN_NRPJUL_NRPAUG_NRPSEP_NRPOCT_NRPNOV_NRPDEC_NRP
201314122270.145139519.866129330.214060620.245332798.84778474.835820450.554327208.284492296.775708382.435472064.985573470.37
201324122270.145225041.156129330.214060620.245332798.84778474.835820450.554327208.284492296.775708382.435472064.985573470.37
201334122270.145225041.155436199.164060620.245332798.84778474.835820450.554327208.284492296.775708382.435472064.985573470.37
201344122270.145225041.155436199.163911852.945332798.84778474.835820450.554327208.284492296.775708382.435472064.985573470.37
201354122270.145225041.155436199.163911852.945017381.254778474.835820450.554327208.284492296.775708382.435472064.985573470.37
201364122270.145225041.155436199.163911852.945017381.253978718.515820450.554327208.284492296.775708382.435472064.985573470.37
201374122270.145225041.155436199.163911852.945017381.253978718.514813178.494327208.284492296.775708382.435472064.985573470.37
201384122270.145225041.155436199.163911852.945017381.253978718.514813178.494772932.544492296.775708382.435472064.985573470.37
201394122270.145225041.155436199.163911852.945017381.253978718.514813178.494772932.545844202.475708382.435472064.985573470.37
2013104122270.145225041.155436199.163911852.945017381.253978718.514813178.494772932.545844202.474616778.985472064.985573470.37
2013114122270.145225041.155436199.163911852.945017381.253978718.514813178.494772932.545844202.474616778.984843327.165573470.37
2013124122270.145225041.155436199.163911852.945017381.253978718.514813178.494772932.545844202.474616778.984843327.163715367.73
rajat2392
Partner - Creator III
Partner - Creator III

Hi Upali,

check the attached app....

upaliwije
Creator II
Creator II
Author

Dear Rajat

Thanks a  lot . It is working Fine

rajat2392
Partner - Creator III
Partner - Creator III

welcome Upali..can you please mark it as correct...

upaliwije
Creator II
Creator II
Author

Dear Rajat

Thanks a lot for your help.

I have a small issue and need your help to solve.

I want to create a pivot table with a single row which should show the data highlighted in bold letteers by me in a single Row. All other conditions applied to previous pivot table should remain unchanged.

YEARMONTH JAN_NRP FEB_NRP MAR_NRP APR_NRP MAY_NRP JUN_NRP JUL_NRP AUG_NRP SEP_NRP OCT_NRP NOV_NRP DEC_NRP
20131    4,122,270     5,139,520     6,129,330     4,060,620     5,332,799     4,778,475     5,820,451     4,327,208     4,492,297     5,708,382     5,472,065     5,573,470
20132    4,122,270     5,225,041     6,129,330     4,060,620     5,332,799     4,778,475     5,820,451     4,327,208     4,492,297     5,708,382     5,472,065     5,573,470
20133    4,122,270     5,225,041     5,436,199     4,060,620     5,332,799     4,778,475     5,820,451     4,327,208     4,492,297     5,708,382     5,472,065     5,573,470
20134    4,122,270     5,225,041     5,436,199     3,911,853     5,332,799     4,778,475     5,820,451     4,327,208     4,492,297     5,708,382     5,472,065     5,573,470
20135    4,122,270     5,225,041     5,436,199     3,911,853     5,017,381     4,778,475     5,820,451     4,327,208     4,492,297     5,708,382     5,472,065     5,573,470
20136    4,122,270     5,225,041     5,436,199     3,911,853     5,017,381     3,978,719     5,820,451     4,327,208     4,492,297     5,708,382     5,472,065     5,573,470
20137    4,122,270     5,225,041     5,436,199     3,911,853     5,017,381     3,978,719     4,813,178     4,327,208     4,492,297     5,708,382     5,472,065     5,573,470
20138    4,122,270     5,225,041     5,436,199     3,911,853     5,017,381     3,978,719     4,813,178     4,772,933     4,492,297     5,708,382     5,472,065     5,573,470
20139    4,122,270     5,225,041     5,436,199     3,911,853     5,017,381     3,978,719     4,813,178     4,772,933     5,844,202     5,708,382     5,472,065     5,573,470
201310    4,122,270     5,225,041     5,436,199     3,911,853     5,017,381     3,978,719     4,813,178     4,772,933     5,844,202     4,616,779     5,472,065     5,573,470
201311    4,122,270     5,225,041     5,436,199     3,911,853     5,017,381     3,978,719     4,813,178     4,772,933     5,844,202     4,616,779     4,843,327     5,573,470
201312    4,122,270     5,225,041     5,436,199     3,911,853     5,017,381     3,978,719     4,813,178     4,772,933     5,844,202     4,616,779     4,843,327     3,715,368