Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
MountainHorn
Frequent Visitor

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:

RawData_Capture.PNG

 

Desired result calculation and visual in excel:

ExcelCalcs_Capture.PNG

 

PowerBI relationships:

PowerBI_Desktop_relationship_capture.PNG

 

PowerBI DAX formula for open permits yielding incorrect result:

PowerBI_Desktop_permits_calc_capture.PNG

1 ACCEPTED SOLUTION

@MountainHorn,

 

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

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

 

It is impossible to understand your question with such small screenshots.  Share the link from where i can download your file.  Show the expected result there as well.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thanks for replying. Links to the two files below:

 

Desktop PBIX File

 

Excel file including desired result

 

Hi,

 

Sorry for the late revert.  I tried but was unsuccessful in solving the problem.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@MountainHorn,

 

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

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.