How to create a dataset based on another dataset

Options

Hi everyone,

I would like to create a calendar table based on an orders data base, based on min and max date from that.

Do you know a way to do it?

Thanks for your help

Eduard

Best Answer

  • jessdoe
    jessdoe Contributor
    Answer ✓
    Options

    What is your exact formula and what error did you receive?

    If date_column is order date, then you can just use order_date in all of your transforms - you don't need to create a separate table. If the date_column is from a different table, please past your formula + error

Answers

  • jessdoe
    jessdoe Contributor
    Options

    Using your orders table, you can create a date table via a case statement like

    case when date_column >= min(order_date) and date_column < = max(order_date) then date_column

    Also highly recommend checking out the domo dimensions calendar table in the app store to see if that meets your need.

  • You would use magic ETL. Use the group by tile and create max and min values. You could also use the formula tile and use MAX() and MIN(). You could also use a beastmode in a card and use MAX() and MIN().

    There is also a calendar chart type. This knowledge article walks through how to use them: https://domo-support.domo.com/s/article/360043427973?language=en_US

    If I solved your problem, please select "yes" above

  • ecabanas
    Options

    Hi
    Thanks for your help, but I did a statement in sql transform but did not work

    case when date_column >= min(order_date) and date_column < = max(order_date) then date_column end

    I don't know what I'0m doing wrong

    thanksssss

  • jessdoe
    jessdoe Contributor
    Answer ✓
    Options

    What is your exact formula and what error did you receive?

    If date_column is order date, then you can just use order_date in all of your transforms - you don't need to create a separate table. If the date_column is from a different table, please past your formula + error