Hii everyone, In our Database , we store Current 3 Days data in the Main Table and the rest of the data in Monthly and yearly Tables. An Example is shown below:
Table Name | Data |
|---|
Sales | Current 3 Days Data. |
Sales _2025_Feb | February 2025 Data |
Sales _2025_Jan | January 2025 Data |
Sales _2024_Dec | December 2024 Data |
Sales _2024_Nov | November 2024 Data |
Sales _2024 | All 2024 Data of all the months |
Sales _2023 | All 2023 Data of all months |
Sales _2022 | All 2022 Data of all Months |
Note: All these tables have identical column names .
We need to create Canvases in which when the user selects a date range from the date Filter, then depending on the selected date, the data is fetched from the related table and displayed on the canvas. Kindly find some scenarios below:
Scenario 1: If today’s date is 13-Feb-2025, When the user selects date 12-Feb-2025 to 13-Feb-2025, then the data from table named Sales should be displayed on the canvas.
Scenario 2: When the user selects date from Nov 2024, then the data from the table named Sales_2024_Nov should be displayed.
Scenario 3 :When the user selects data range of multiple months ex: 3rd March -2024 to 25th June -2024 ,then the data should be fetched from the yearly table named Sales_2024.
Kindly suggest on how to create the canvases as per the above tables structure.
Let us know if more information is required .Thank you.