Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
balajisj30
Creator
Creator

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
Ivan_Bozov
Luminary
Luminary

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.

vizmind.eu
balajisj30
Creator
Creator
Author

Hi Ivan Bozov

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

Thanks

Balaji

devarasu07
Master II
Master II

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);

Ivan_Bozov
Luminary
Luminary

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

vizmind.eu
balajisj30
Creator
Creator
Author

Hi Ivan Bozov

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

Thanks

Balaji

Ivan_Bozov
Luminary
Luminary

Can you share your app file?

vizmind.eu
balajisj30
Creator
Creator
Author

PFA QS app.

Ivan_Bozov
Luminary
Luminary

Go to the data load editor and try loading this.

vizmind.eu
balajisj30
Creator
Creator
Author

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