cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a table with a range of dates?

TomerA
8 - Cloud Apps
8 - Cloud Apps

Hi,
I have a use case were I have this table

TomerA_0-1641974345286.png

I want to plot in a chart in continues dates (i.e. from the minimum date of launch_time to the current date).
e.g. 1/1/20 - 1/12/22 and count the number of instances that were alive in a certain date based on the last_seen. Meaning that a machine is a live between launch_day and last_seen and it will be counted as alive in the date range between.
My main problem is creating a date table. I thought it would be easy but I didn't find any reference online on creating date range tables in Sisense model. Is there a way to do this inside Sisense? 
Regrading on counting machines per each day, already have a direction on how to do this.

3 REPLIES 3

piogod
8 - Cloud Apps
8 - Cloud Apps

Hi @TomerA 

If you're running Sisense on Linux you can try to use the Custom Code feature to generate a calendar.
Please select 'Custom' - > 'Add Custom Code':

piogod_0-1642096568978.png

then click on 'Create a Calendar':

piogod_1-1642097833252.png

you can configure your calendar by given 'Start Date' and 'End Date':

piogod_2-1642098064413.png

After you click 'Done' additional table will be created as your calendar (based on config in the example above, the calendar will be created in the range from 2020-01-01 to the current date). You can use such date dimension table as you like in your EC structure transformation. There are some more fields you can find useful such as [DayOfWeek]. 

If you are running Sisense on Windows you please follow this article:

https://support.sisense.com/kb/en/article/date-dimension-file

TomerA
8 - Cloud Apps
8 - Cloud Apps

Hi,
Although we are running Sisense on Linux we don't have that option. But the Windows article describe a similar use case and might do the trick.
Thank you so much.

Hi Tomer,

on Linux please ensure in Admin section of Sisense in Features, that Custom Code is enabled :1.png