Hi all.
I have the table with some order information (id, description, order date, ...) and I have a time data-table for using as dimension with info about years, months and its start and end dates.
ORDER_ID ORDER_DATE YEAR MONTH START_DATE END_DATE
id1 15.03.2018 2018 JAN-18 01.01.2018 31.01.2018
id2 25.02.2018 2018 FEB-18 01.02.2018 28.02.2018
id3 03.09.2018 2018 MAR-18 01.03.2018 31.03.2018
(.......) (......)
I need to create the analysis that would be show me my orders allocated by periods like in example below.
My main question is how can I compare order date with month's start-end dates and display in hierarchy, how to put order date between two period dates, should I use some formula or filter or I need to do it on database level, adding a period column to order table?
YEAR MONTH ORDER ORDER_DATE
(....)
2018 FEB-18 id2 25.02.2018
2018 MAR-18 id1 15.03.2018
(....)
2018 SEP-18 id3 03.09.2018