Member-only story
Date Island — Qlik Sense
2 min readJun 7, 2020
Dealing with multiple dates from multiples tables
Recently, I faced a situation of having to build a star schema where there were 5 tables containing dates, and I needed to be able to make a selection by date for whole model. Usually for one or 2 calendars, you can use the famous MASTER CALENDAR. But if you create 5 master calendars:
- it will not allow you to cross data check,
- The code will be very confusing for others,
- You will have a bad performance on script loading.
HOW TO SOLVE: DATA ISLAND
CREATE YOUR DATA SCHEMA
I created a nearly star schema:
STANDARIZE THE DATA FORMAT
You need to make sure all dates are in the same format, adjusting it in the load script:
Date(DataCompra, 'D/M/YYYY') as DataCompra,Date(DataMeta, 'D/M/YYYY') as DataMeta,Date(DataVenda, 'D/M/YYYY') as DataVenda,Date(VideoData, 'D/M/YYYY') as DataVideo,Date(FBData, 'D/M/YYYY') as FBData,