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

Chatting with ChatGPT about Qliksese

Hi, I have asked ChatGTP to write some code that will show me the third business day of the week. I have been amazed at how fast and accurate it has been.

Do you think it can be optimized? (al code in text format bellow)

MigueldelCampo_0-1671280261962.png

 

 

// Set up a calendar table to use for date calculations
Calendar:
LOAD
date(YearStart(year, month, 1) + rowNo() - 1) as date,
week(YearStart(year, month, 1) + rowNo() - 1) as week,
year(YearStart(year, month, 1) + rowNo() - 1) as year,
month(YearStart(year, month, 1) + rowNo() - 1) as month,
day(YearStart(year, month, 1) + rowNo() - 1) as day
FROM
[lib://calendar/calendar.qvd] (qvd);

// Set up a table to store the 3rd business day for each week
ThirdBusinessDay:
LOAD
min(date) as third_business_day
RESIDENT
Calendar
WHERE
isweekday(date) = 1 and day >= 3;

// Group by week to get the 3rd business day for each week
ThirdBusinessDay:
LOAD
third_business_day,
week,
year,
month
RESIDENT
ThirdBusinessDay
GROUP BY
week,
year,
month;

// Drop the original calendar table
DROP TABLE Calendar;

2 Replies
Moritz
Contributor III
Contributor III

I also experimented a bit with ChatGPT and it completely blew my mind! Just key in any pieces of loadscript it explains you, what this will do and even where to optimize.

Considering, that this is still beta and that the focus so far most certainly hasn't been Qlik Loadscripting, this  is absolutely stunning! Imagine, how much more powerful this can get, once it's specifically trained.

This can and imho most certainly will substantially change way coding of any kind will be done in the future.

Kathlyn
Contributor II
Contributor II

Can ChatGPT effectively answer questions and provide insights related to Qliksense datasets and dashboards?