Forum Discussion

Bluefish's avatar
Bluefish
New Member
4 years ago
Solved

CONNECT two tables using an AUXILIAR CALENDAR

I want to to connect two tables. The first one is a historical annual dates table organized month by month; the second one a 2022-daily table. 

 

MY Objective is just make a graphic that shows months on the x-axis. For connecting the two mentioned tables, i will creat a new calendar table. Is It right?

 

Any suggestions?

  • Hi Bluefish ,

     

    Suppose you have the following example data.

    Historical Table                                        Daily Table

                             

     

    Then please add a new column to the Historical Table.

     

    MonthYear = [Year] & " " & [Month]

     

    Then create the calendar table and inter-table relationships

     

    CALENDAR = 
    ADDCOLUMNS (
        CALENDAR ( DATE ( 2020, 12, 1 ), TODAY () ),
        "Month_Year", FORMAT ( [Date], "yyyy mmm" ),
        "YM_Num", FORMAT ( [Date], "yyyymm" )
    )

     

    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
    Best Regards,
    Winniz
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

2 Replies

  • v-kkf-msft's avatar
    v-kkf-msft
    Icon for Community Support rankCommunity Support

    Hi Bluefish ,

     

    Suppose you have the following example data.

    Historical Table                                        Daily Table

                             

     

    Then please add a new column to the Historical Table.

     

    MonthYear = [Year] & " " & [Month]

     

    Then create the calendar table and inter-table relationships

     

    CALENDAR = 
    ADDCOLUMNS (
        CALENDAR ( DATE ( 2020, 12, 1 ), TODAY () ),
        "Month_Year", FORMAT ( [Date], "yyyy mmm" ),
        "YM_Num", FORMAT ( [Date], "yyyymm" )
    )

     

    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
    Best Regards,
    Winniz
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.