Forum Discussion

akhassim's avatar
akhassim
New Member
2 years ago

Power bi

I ahve the following graph. 

Each line needs to start and end with the dates with first info in. I believe this entails finding first and last dates where data is >0 and adding those into the measure as the filters. i.e.
  1. For actual dates: Cumulative Last Actual Date = CALCULATE(LASTDATE('Cost Graphs'[Date]),('Cost Graphs'[Cost Actual]>0))
  2. For actual dates: Cumulative First Actual Date = CALCULATE(FIRSTDATE('Cost Graphs'[Date]),('Cost Graphs'[Cost Actual]>0))
  3. Forecast will start with the Last Actual Date, end with Last Forecast Date
  4. Budget will start with the First Budget Date, end with Last Budget Date.

 

this is my current measure. Please assist.

CumulativeCostActual =
CALCULATE(
    SUM('cost graphs'[Cost Actual]),
    FILTER(
        ALL('cost graphs'),
        'cost graphs'[Date] <= MAX('cost graphs'[Date])
    )
)





 

 

1 Reply