Forum Discussion

adrien5555's avatar
adrien5555
Icon for Helper II rankHelper II
10 years ago
Solved

Date relationships not working

Hi all,

 

Two different sources, linked by dates, but can't get a visual with 2 bars each month
(green bar ok, grey bar not ok):

 

 

here is a look at the two linked dates:

 

 

 

 

 

 

thanks for your help

 

  • Anonymous's avatar
    Anonymous
    10 years ago

    You should use a Date table an create relationships to both tables. Then in the chart use the Month of the Dates table to see the amounts.

    Date tables must contain continuous dates.

     

    Regards

7 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    You should create a new colum with something like STARTOFMONTH(IssuedAt) to get the same value in both tables.

    Then make the relationship with the new column.

    Regards 

    Rodrigo

    • adrien5555's avatar
      adrien5555
      Icon for Helper II rankHelper II

      Greg_Deckler: same date type : dd/mm/yyyy. I tried with a solution you gave elsewhere like = MONTH([date]) & YEAR([date]) but I get 

      "Expression error: The name 'MONTH' wasn't recognized. Make sure it's spelled correctly."

       

      Anonymous: "get the same value in both tables." => sure, got it, thanks!

       

      I'm just beginnig with PBI...I get the following error:

       

      "Expression error: The name 'STARTOFMONTH' wasn't recognized. Make sure it's spelled correctly."

       

       

      I think I don't enter DAX correctly...

       

      best,

      • Anonymous's avatar
        Anonymous
        Not applicable

        adrien5555 You are in power bi desktop right?

         

         

         

        Regards

         

        Rodrigo

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    Looks like your dates are in 2 different formats, might try making them both mm/dd/yy or dd/mm/yy. Blanks generally indicate nont-matching rows in a relationship.