Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
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.

Highlighted
Creator
Creator

Hi Ivan Bozov

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

Thanks

Balaji

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

Highlighted
Luminary
Luminary

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

Highlighted
Creator
Creator

Hi Ivan Bozov

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

Thanks

Balaji

Highlighted
Luminary
Luminary

Can you share your app file?

Highlighted
Creator
Creator

PFA QS app.

Highlighted
Luminary
Luminary

Go to the data load editor and try loading this.

Highlighted
Creator
Creator

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