Forum Discussion

CJ_96601's avatar
CJ_96601
Helper V
6 years ago
Solved

Relationships

Dear All, 

 

Is it possible to create a table that holds all dates to and build the relationship to calendar using only that one date, like interval match in qlikview.

 

  Example

 

  Table 1                                   Interval Match                                  Calendar

     Order Date                               Date                                              Date

     Delivery Date                                                                                 Year

 

Table 2

    Purchase Date

    Payment Date

 

Table 3

    Return Date

    Acceptance Date

 

Below is the diagram for easy reference

Thanks

 

 

   

  • Hi CJ_96601 ,

     

    You can create a calculated table using DAX below, then create relationship with Calendar table.

     

    Date table= UNION(
    SELECTCOLUMNS('Table1',"Date1",[Order Date ],"Date2",[Delivery Date ]),
    SELECTCOLUMNS('Table2',"Date1",[Purchase Date],"Date2",[Payment Date]),
    SELECTCOLUMNS('Table3',"Date1",[Return Date],"Date2",[Acceptance Date]))

    Best Regards,

    Amy

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • Uzi2019's avatar
    Uzi2019
    Community Champion

    hi CJ_96601 

     

    If possible would you please share me sample file if it does not contain any sensitive data. or create small sample data and share so that i will try to solve the problem.

     

    thanks,

    Uzma


     

     

     

       


     

  • v-xicai's avatar
    v-xicai
    Community Support

    Hi CJ_96601 ,

     

    You can create a calculated table using DAX below, then create relationship with Calendar table.

     

    Date table= UNION(
    SELECTCOLUMNS('Table1',"Date1",[Order Date ],"Date2",[Delivery Date ]),
    SELECTCOLUMNS('Table2',"Date1",[Purchase Date],"Date2",[Payment Date]),
    SELECTCOLUMNS('Table3',"Date1",[Return Date],"Date2",[Acceptance Date]))

    Best Regards,

    Amy

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.