Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I need a help from you guys. I have attached the qlikview document and the image. I want the data to be show like the image. How can i do this?.
-Raghu.
here is the image
-Raghu.
Hi Raghu,
Please check attached file. It may useful for you.
Best Regards,
Hi Asim,
I tried that one, but requirement is show only the current month and the last month values.
Is there any other way to show the values.
Thanks,
Raghu.
Hi Raghu,
MTD is not supported by Qlikview. So you should create a master calendar as below:
Then you should change the dimension of your pivot table as below:
IF(cal_mtd_current=1,Month(date))
IF(cal_mtd_previous=1,Month(date))
Range:
LOAD
min(Datefield) as startdate,
max(Datefield) as enddate
resident Sales;
//Peek out the values for later use
let vStart = peek('startdate',-1,'Range')-1;
let vEnd = peek('enddate',-1,'Range');
let vRange = $(vEnd) - $(vStart);
//Remove Range table as no longer needed
Drop table Range;
//Generate a table with a row per date between the range above
Date:
Load
$(vStart)+recno() as Date
autogenerate $(vRange);
//Calculate the Parts you need to examine
Calendar:
load
//Date as MyDate,
date(Date,'DD.MM.YYYY') as Cal_FullDate,
date(Date,'DD.MM.YYYY') as Datefield,
Year(Date) as Cal_Year,
'Q'&ceil(Month(Date)/3) AS Cal_Quarter,
Month(Date)&'-'&right(year(Date),4) as Cal_MonthYear,
Month(Date) as Cal_Month,
Day(Date) as Cal_Day,
Week(Date) as Cal_Week,
Weekday(Date) as Cal_WeekDay,
YearToDate(Date , 0, 1, $(v_date))*-1 AS Cal_YTD_Current,
YearToDate(Date , -1, 1, $(v_date))*-1 AS Cal_YTD_Previous,
YearToDate(Date , 0, Month('$(v_date)'))*-1 AS Cal_MTD_Current,
YearToDate(Date , -1, Month('$(v_date)'))*-1 AS Cal_MTD_Previous
Resident Date;
//Tidy up
Drop table Date;
hi you can do Month-1 it will work
this will help
=if((Month(date) = month(today())),Month(date), if((month(date)=month(today()))-1,month(Month(date)-1)))
Hi
AtifAhmad -- I had given your statement but it showing the 3 months. Can you look the attached one and let me know what is wrong in that.
Asim -- I gave the code, and same expression i used but data not showing. can you check the attached file and tell me what is wrong in that. Please
-Raghu.
Hi Raghu,
Please check attached file. I think that will help you.
Kind Regards,
Asim Akin
Raghu, try the attcahced file i have fixed it