Forum Discussion

cocoloco79's avatar
cocoloco79
Helper III
4 years ago
Solved

Subtracting days form date

Hi there   I have two tables for witch I have created a relationship that looks at crop. One table holds a harvest date column and the other table holds number of days to grow plants.   I like t...
  • SteveHailey's avatar
    SteveHailey
    4 years ago

    Hey cocoloco79 . The relationship you had was many-to-many which is problematic. I updated your .pbix and it is linked here

     

    This was the relationship in your file:

     

    I use this code to create a bridge table:

     

    Grow Times = ALL( BI_Planting_Master[CropName], BI_Planting_Master[CropGrowTime])

     

     

    And then updated the relationships:

    And then updated the fields in the table visual:

     

    Someone else may have a better way to do this.. but this is they way I know. Hope that works for you!

     

    -Steve

  • Ashish_Mathur's avatar
    4 years ago

    Hi,

    You may download my PBI file from here.

    Hope this helps.