Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

balajisj30
New Contributor III

Duplicate Derived Field - Qliksense

Hi People

I am getting the Duplicate Derived Field error. Please help me solve this issue.

qlik doubt.PNG

11 Replies
Luminary
Luminary

Re: Duplicate Derived Field - Qliksense

Hi! I guess you have two autoCalendars in the script.

Maybe you unlocked the script and then added data with date fields using the data manager so that QS added second calendar. Try using only one calendar.

balajisj30
New Contributor III

Re: Duplicate Derived Field - Qliksense

Hi Ivan Bozov

I am new to qliksense, Please guide me how to remove the calendar.

Thanks

Balaji

devarasu07
Honored Contributor II

Re: Duplicate Derived Field - Qliksense

Hi,

have u checked this?

date - How does the QlikSense AutoCalendar function work? - Stack Overflow

Derived fields ‒ Qlik Sense

additional note,

instead of auto calendar u can use the custom below calendar script

remember to update Date field based on your fact table Date field name (or just alias as Date in both place)

T_MinMax:

LOAD

    Min(FieldValue('Date',RecNo())) as MinDate,

    Max(FieldValue('Date',RecNo())) as MaxDate

AutoGenerate FieldValueCount('Date');

LET vMinDate = num(Peek('MinDate'));

LET vMaxDate = num(Peek('MaxDate'));

LET vToday = $(vMaxDate);

DROP Table T_MinMax;

Calendar:

LOAD CalDate as Date,

    Day(CalDate) as Day,

    Week(CalDate) as Week,

    WeekDay(CalDate) as WeekDay,

    Month(CalDate) as Month,

    'Q' & Ceil(Month(CalDate)/3) as Quarter,

    Date(MonthStart(CalDate), 'MM-YYYY') as MonthYear,

    Week(weekstart(CalDate)) & '-' & WeekYear(CalDate) as WeekYear,

    Year(CalDate) as Year,

    InMonthToDate(CalDate,$(vToday),0) * -1 as CurrMTDFlag,

InMonthToDate(CalDate,$(vToday),-12) * -1 as LastMTDFlag,

    InYearToDate(CalDate,$(vToday),0) * -1 as CurrYTDFlag,

InYearToDate(CalDate,$(vToday),-1) * -1 as LastYTDFlag;

LOAD Date($(vMinDate) + IterNo()) as CalDate

AutoGenerate 1

While $(vMinDate) + IterNo() <= $(vMaxDate);

Luminary
Luminary

Re: Duplicate Derived Field - Qliksense

You need to go to the data load editor, locate the calendar that you do not need and remove it.

balajisj30
New Contributor III

Re: Duplicate Derived Field - Qliksense

Hi Ivan Bozov

When i remove a calendar and load data, QS is generating another calendar. So the same issue is happening.

Thanks

Balaji

Luminary
Luminary

Re: Duplicate Derived Field - Qliksense

Can you share your app file?

balajisj30
New Contributor III

Re: Duplicate Derived Field - Qliksense

PFA QS app.

Luminary
Luminary

Re: Duplicate Derived Field - Qliksense

Go to the data load editor and try loading this.

balajisj30
New Contributor III

Re: Duplicate Derived Field - Qliksense

Hi Ivan

I get the same error when i load the file sent by you.

I am building this app for learning purpose, I don't want this file to be corrected. I want to understand why this error persist and how to solve the issue in future.

Capture.PNG

Community Browser