Qlik Community

Qlik DataMarket Discussions

Discussion Board for collaboration regarding Qlik DataMarket.

Not applicable

if quarter not complete i want to show quarter id as null

if quarter not complete i want to show quarter id as null

1 Solution

Accepted Solutions
Not applicable

Re: if quarter not complete i want to show quarter id as null

QTR.PNG

just i done but quarter in the sense 3months i want to show that in complete quarter id as null

Calender:

LOAD

Date,

Month(AddMonths(Date,1)) as Month,

Year(YearStart(Date,1,3))              As Year,

'Q'&Ceil(Month(AddMonths(Date,-2))/3) as Qtr,

Date(Date,'MMM-YY') as MonthYear,

Mod(Month(Date)-3,12)+1 as MonthID

Resident Date;

DROP Table Date;

Temp:

LOAD

Date,Month,Qtr, AutoNumber(Year&Qtr) as YearQrID Resident Calender;

Left Join(Temp)

LOAD

YearQrID,Count(DISTINCT Month) as MonthCout  Resident Temp Group By YearQrID;

Left Join(Calender)

LOAD

Date,YearQrID,Qtr as NewQtr Resident Temp Where MonthCout=3;

DROP Table Temp;

thank you......

3 Replies

Re: if quarter not complete i want to show quarter id as null

Could you post your data set or app?

What do you mean by not complete?

Not applicable

Re: if quarter not complete i want to show quarter id as null

QTR.PNG

just i done but quarter in the sense 3months i want to show that in complete quarter id as null

Calender:

LOAD

Date,

Month(AddMonths(Date,1)) as Month,

Year(YearStart(Date,1,3))              As Year,

'Q'&Ceil(Month(AddMonths(Date,-2))/3) as Qtr,

Date(Date,'MMM-YY') as MonthYear,

Mod(Month(Date)-3,12)+1 as MonthID

Resident Date;

DROP Table Date;

Temp:

LOAD

Date,Month,Qtr, AutoNumber(Year&Qtr) as YearQrID Resident Calender;

Left Join(Temp)

LOAD

YearQrID,Count(DISTINCT Month) as MonthCout  Resident Temp Group By YearQrID;

Left Join(Calender)

LOAD

Date,YearQrID,Qtr as NewQtr Resident Temp Where MonthCout=3;

DROP Table Temp;

thank you......

Not applicable

Re: if quarter not complete i want to show quarter id as null

any simplification for this....

Community Browser