Forum Discussion

Janka1712's avatar
Janka1712
Frequent Visitor
5 years ago

Dates to another table

Hi, hope someone will help me

 

How do I get dates from main table to sales table? There is relationship betweent these two tables on Order column, orders can repeat in main table.

I need to have dates in sales table too because amounts are in different currencies and exchange rate formula will not work without date.

I tried TREATAS but have problem with date format.

3 Replies

  • AllisonKennedy's avatar
    AllisonKennedy
    Community Champion

    You should be able to use RELATED(DimDate[Date]) or month, week, etc to get whatever info you need into the Orders table. This is only necessary if doing a Column or row context measure. Otherwise, the relationship should work as long as it is ACTIVE?

    • Janka1712's avatar
      Janka1712
      Frequent Visitor

      I want a column. Relationship is active, many to many. That was first thing I tried, doesnt work. It is telling me this:

       

      The column 'SSBI[TRIPNAME]' either doesn't exist or doesn't have a relationship to any table available in the current context.

       

       

       

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Janka1712 .

     

    You said there are repeat orders in main table. does that mean there are multiple dates for one order in main table?

    Consider there are 3 dates for order 001 in main table, which date shoud be used for order 001 in sales table?

    If i misunderstood your meaning, please share some sample data to us.

     

    Best Regards,

    Jay