Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all,
please Find Attachment
am sending weekly Rolling Days calculation
Can any one modifies The Below Qvw File With more Efficient Way
i have Done but don't think it efficient way of doing this
For Following task
1)how to create Manual weeks??
i have 1-27 dates
i want
1-7 as first week
8-14 2nd week
15 -21 as 3 rd Week
22-27 as 4th week
in front end
2) and how to create Weekly Sales for Comparison current Week vs previous week of the month
You can use below script to get weeknumber as per your requirements.
Data:
LOAD S_Date,
Sales
FROM
[New Microsoft Office Excel Worksheet.xlsx]
(ooxml, embedded labels, table is Sheet1);
// ****************Creating the Master Calendar *************
Temp_Calendar_Range:
LOAD
Date(Min([S_Date]), 'DD/MM/YY') as MinDate,
Date(Max([S_Date]), 'DD/MM/YY') as MaxDate
RESIDENT [Data];
LET vMinDate = Num(Peek('MinDate', 0, 'Temp_Calendar_Range'));
LET vMaxDate = Num(Peek('MaxDate', 0, 'Temp_Calendar_Range'));
LET vToday =num(today());
DROP TABLE Temp_Calendar_Range;
DateField:
LOAD
date ($(vMinDate) + rowno() -1) as TempDate
AUTOGENERATE
$(vMaxDate)- $(vMinDate)+1;
MasterCalendar:
LOAD
TempDate as [S_Date],
Day(TempDate) as Day,
WeekDay (TempDate) as Weekday,
Week(TempDate-1) as Week,
Month(TempDate) as Month,
Num(Month(TempDate)) as MonthNO,
Year(TempDate) as Year,
'Q' & ceil(month(TempDate) / 3) as Quarter,
Date (monthstart (TempDate) , 'MMM YYYY') as MonthYear,
Week(TempDate)&'-'&Year(TempDate) as WeekYear
RESIDENT DateField
ORDER BY TempDate ASC;
DROP TABLE DateField;
Please check enclosed file...
Hi,
I hope this would help you in the dimension expression for ur chart.
=Pick(Num(Week(S_Date)),'W1','W2','W3','W4','W5')
Regards,
Venkat
but in this when we click certain Date I doesn't Show comparison