I have three table namely Allitems, InItems and OutItems. The main table is Allitems which is related to the other two table with IN_OUT_ID. I have been able to calculate the min and max date based on the IDs for each of the
Dataset
table using the below DAX Formula
For InItems tables
Min_Start_Date = CALCULATE( MIN(InItems[InDate]), ALLEXCEPT( InItems, InItems[IN_ID] ))
Max_end_Date = CALCULATE( MAX(InItems[InDate]), ALLEXCEPT( InItems, InItems[IN_ID] ))
For OutItems table
Min_Start_Date = CALCULATE( MIN(OutItems[OutDate]), ALLEXCEPT( OutItems, OutItems[OUT_ID]))
Max_end_Date = CALCULATE( MAX(OutItems[OutDate]), ALLEXCEPT( OutItems, OutItems[OUT_ID] ))
the relationship i have change the direction to flow both ways
I am trying to bringback min and max date by comparing the the min and max date from OutItems and Allitems and use it as a column in Allitems table. For example taking IN_ID 1, the Min date is 08/01/2019. I will also take the min date of OUT_ID which is 03/02/2019. Then I want the min date between these two date which is 08/01/2019. Can anybody help on how I can achieve this
Expected outcome
I am open to any question thanks