Forum Discussion

TomerA's avatar
TomerA
Cloud Apps
01-12-2022

How to create a table with a range of dates?

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

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

Replies have been turned off for this discussion
  • 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':

    then click on 'Create a Calendar':

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

    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's avatar
      TomerA
      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.

      • michael_qbeeq's avatar
        michael_qbeeq
        Cloud Apps

        Hi Tomer,

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