Forum Discussion

jjstefanovic's avatar
jjstefanovic
New Member
3 years ago

Payback Period As Measure

 

Team,

 

Has anyone calculated payback period using a cumulative column calculated as a measure? The table below is sample data of 3 fields (Well, Month, and Net Cash Flow), and 1 field that is a measure (Cumulative Cash Flow).

What I would like to be able to do is calculated how many periods the Cumulative Cash Flow < 0.

I can get the data to show the days in the month by creating the PBP measure: PBP = IF([Cumulative Cash Flow] < 0, COUNTROWS(Calendar Table[Date]),0))

 

The issue is this measure does not total at the bottom. In fact, the total is 0 since the last value in the calculation yields 0.

 

Would appreciate any help here!!

 

WellMonthNet Cash FlowCumulative Cash FlowPBP

Well A

12/31/2021-50000-5000031
Well A1/31/202210000-4000031
Well A2/28/202215000-2500028
Well A3/31/202220000-500031
Well A4/30/20221000050000
Well A5/31/202220000

25000

0

TOTAL  

 

0

4 Replies

  • Anonymous I don't have the option to attach a file on this forum but I can provide a more detailed table if that helps. See below:

     

    Well NameMonth YearNet Cash Flow - Act/FC (LOS)Cumulative Cash Flow - Forecast
    Well A22-Jan00
    Well A22-Feb00
    Well A22-Mar00
    Well A22-Apr00
    Well A22-May00
    Well A22-Jun00
    Well A22-Jul00
    Well A22-Aug00
    Well A22-Sep00
    Well A22-Oct00
    Well A22-Nov00
    Well A22-Dec00
    Well A23-Jan00
    Well A23-Feb00
    Well A23-Mar00
    Well A23-Apr00
    Well A23-May00
    Well A23-Jun-53122.8-53122.8
    Well A23-Jul0-53122.8
    Well A23-Aug0-53122.8
    Well A23-Sep0-53122.8
    Well A23-Oct0-53122.8
    Well A23-Nov0-53122.8
    Well A23-Dec18233.07-34889.7
    Well A24-Jan14426.64-20463.1
    Well A24-Feb12847.51-7615.58
    Well A24-Mar11603.663988.079
    Well A24-Apr10595.8414583.92
    Well A24-May9760.90224344.82
    Well A24-Jun9056.65933401.48
    Well A24-Jul8453.79241855.27
    Well A24-Aug7931.26749786.54
    Well A24-Sep7473.5757260.11
    • Anonymous's avatar
      Anonymous
      Not applicable

      jjstefanovic 

      Step 1: Upload data into Power Bi (I made some changes to the date format as Power Bi was reading the month/year properly.


      Step 2: Create a new Measure

      PBP = 
      
      CALCULATE(
          COUNTROWS(Sheet1),
          KEEPFILTERS(Sheet1[Cumulative Cash Flow - Forecast]<=0)
      )


      Step 3: Visualize



      BR , if that helps, please mark this as a solution


    • Ashish_Mathur's avatar
      Ashish_Mathur
      Super User

      Hi,

      Based on that data that you have shared, show the expected result.