Forum Discussion

MountainHorn's avatar
MountainHorn
Frequent Visitor
7 years ago
Solved

Cumulative Sum Across Multiple Date Columns

I am attempting to create a cumulative sum balance that evaluates two different date columns across an evaluation date array. An example of what I'm trying to achieve is attached below via a series of image snapshots. For example, for a permit to be an "open permit" at the time of the evaluation month, it must have a permit date (column J) that is <= the evaluation date AND a spud date (column K) that is > the evaluation date. The dax formula I have set up does not achieve this result. Any suggestions?

 

Raw data summary capture:

 

Desired result calculation and visual in excel:

 

PowerBI relationships:

 

PowerBI DAX formula for open permits yielding incorrect result:

  • v-chuncz-msft's avatar
    v-chuncz-msft
    7 years ago

    MountainHorn,

     

    You may disable the relationship and change the right side of inequality to MAX ( Date_Table[Date] ).

4 Replies