Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Luisanabria
Creator
Creator

MasterCalendar

Hi all. I have a problem with my master calendar but l want to explain step by step tryig to be clear:

1. First part of my mastercalendar is:

MinMaxTemp:
Load
Min([Fecha]) as MinDate,
Max([Fecha]) as MaxDate

Resident [zRTVENTASNETASPRODUCTO];


Let vMinDate = NUM(Peek('MinDate',0,'MinMaxTemp'));
Let vMaxDate = NUM(Peek('MaxDate',0,'MinMaxTemp'));
Let vToday = $(vMaxDate);

CalTemp:
LOAD
DATE($(vMinDate) + ROWNO() - 1) as TempDate
AUTOGENERATE
$(vMaxDate) - $(vMinDate)+1;

Bold letters are the problem that Qlik Sense say but l think problem is that function MIN and MAX doesnt work ok. If l calculate only this part:

Load
Min([Fecha DetFact]) as MinDate,
Max([Fecha DetFact]) as MaxDate
Resident [zRTVENTASNETASPRODUCTO];

It doesnt calculate the dates:

fdoflogtz1_0-1656964092234.png

Thats why l think problem appears in CalTemp. I checked and l dont have null values or something.

2. I have my connection to one DateBase, this have a field "Date"(Fecha), that contain this format 'YYYY-MM-DD' but l want to change to 'DD/MM/YYYY'. l tried using Date#() and many others ways but functions not apply any change to my field, still with YYYY-MM-DD

add screen of date format even when l used the fuction:

fdoflogtz1_3-1656964659401.png

 

My questions are: 

1. why doesnt make any change to my field with any of the functions?

 

2. If that is not the problem, how can l fix this?

fdoflogtz1_2-1656964448121.png

 

THANK YOU, HOPE BE CLEAR AND SOMEONE CAN HELP ME 😄 

Labels (3)
1 Solution

Accepted Solutions
Lisa_P
Employee
Employee

You are correct. Your date [Fecha] is being interpreted as a string, so the Min function will not work properly.

If you use the Date#(Fecha, 'YYYY-MM-DD') in the original load statement of zRTVENTASNETASPRODUCTO table it may work.

 

View solution in original post

2 Replies
Lisa_P
Employee
Employee

You are correct. Your date [Fecha] is being interpreted as a string, so the Min function will not work properly.

If you use the Date#(Fecha, 'YYYY-MM-DD') in the original load statement of zRTVENTASNETASPRODUCTO table it may work.

 

Luisanabria
Creator
Creator
Author

Hi Lisa

Thank you so much, that was the problem, l was trying Date#() in my mastercalendar and need to apply in my original load. 

 

Thanks