Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Master Calander Creation

HI All,

i am creating calander ,but some errore in script for creating min and max data could u please help to resolve this errore !

do you have any app with sample data upload me it will use full me please

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

4 Replies
MK_QSL
MVP
MVP

T1:

LOAD

  [Product Sale],

    Date(Bill_Date) AS billdate

FROM

[excel data.xlsx]

(ooxml, embedded labels, table is Sheet1);

Temp:

Load

  Min(billdate) as MinDate,

  Max(billdate) as MaxDate

Resident T1;

SET vFiscalYearStartMonth = 4;

LET vStartDate = num(Peek('MinDate',0,'Temp'));

LET vEndDate = num(Peek('MaxDate',0,'Temp'));

DROP TABLE Temp;

FiscalCalendar:

LOAD

*,

Dual('Q' & Ceil(FiscalMonth/3), Ceil(FiscalMonth/3)) AS FiscalQuarter, // Fiscal Calendar Quarter

Dual(Text(Date(MonthEnd(billdate), 'MMM')), FiscalMonth) AS FiscalMonthName; // Fiscal Calendar Month Name

LOAD

*,

Year(billdate) AS Year, // Standard Calendar Year

Month(billdate) AS Month, // Standard Calendar Month

Date(MonthEnd(billdate), 'MMM') AS MonthName,  // Standard Calendar Month Name

Dual('Q' & Ceil(Month(billdate)/3), Ceil(Month(billdate)/3)) AS Quarter,  // Standard Calendar Quarter

Mod(Month(billdate) - $(vFiscalYearStartMonth), 12)+1 AS FiscalMonth,  // Fiscal Calendar Month

YearName(billdate, 0, $(vFiscalYearStartMonth)) AS FiscalYear;  // Fiscal Calendar Year

LOAD

Date($(vStartDate) + RangeSum(Peek('RowNum'), 1) - 1) AS billdate,

RangeSum(Peek('RowNum'), 1) AS RowNum

ecolomer
Master II
Master II

See this file

Not applicable
Author

Thanku Manish,

now it is reloading no errore ,good but only two fields i am able to see like billdate and Product sale where are the rest like FYYear,Fyquarter,FyMonth

MK_QSL
MVP
MVP

Check this