Forum Discussion
Flat Line in Cumulative Curve
- 9 years ago
Hi hackfifi
What I would suggest you do is the following:
Create a measure for your A Value with the example below:
A Total = IF(SUM('Table2'[A]) = 0,BLANK(),SUM('Table2'[A]))The above will always ensure that there is one place to change it, as well as then make it easier for the filter context later.
Then with the above measure you can now create your cumulative curve with the following measure.
Cumulative Actual = Var LNBD = LASTNONBLANK('Table2'[Date],[A Total]) RETURN CALCULATE([A Total],FILTER(ALL('Table2'[Date]), 'Table2'[Date] <= LNBD)) - 9 years agoHi there for your Year and Month values are those coming from the 'Progress Curve' table or the date table?
I think that might be the reason why it is not working as expected.
Hi hackfifi
Ok that is because the values are not NULL, but have a zero
This should then work, what I am doing is saying if the value is 0 then make it BLANK, which will then create the right filter context for the LASTNONBLANK
CALCULATE (
IF(SUM ( 'Contract Closeout Combined'[A] ) =0,BLANK(),SUM ( 'Contract Closeout Combined'[A] )),
FILTER (
'Contract Closeout Combined' ,
'Contract Closeout Combined'[Date]
<= LASTNONBLANK (
'Contract Closeout Combined'[Date],
SUM ( 'Contract Closeout Combined'[A] )
)
)
)
/ SUM ( 'Total Progress (Forecast)'[Total Progress (Forecast)] )Hi GilbertQ - I think we (you actually) are almost there. The Curve stops on the final data date, but the only issue now is that it is NOT calculating "cumulative"
- GilbertQ9 years ago
Super User
Hi hackfifi
What I would suggest you do is the following:
Create a measure for your A Value with the example below:
A Total = IF(SUM('Table2'[A]) = 0,BLANK(),SUM('Table2'[A]))The above will always ensure that there is one place to change it, as well as then make it easier for the filter context later.
Then with the above measure you can now create your cumulative curve with the following measure.
Cumulative Actual = Var LNBD = LASTNONBLANK('Table2'[Date],[A Total]) RETURN CALCULATE([A Total],FILTER(ALL('Table2'[Date]), 'Table2'[Date] <= LNBD))- hackfifi9 years ago
Helper V
Thanks GilbertQ. I will give it a shot
1. Is 'Table2' a new TABLE with "A" column only or do i refer to my existing table 'Contract Closeout Combined'?
2. I have not tried it yet, but is it the correct syntax to have "=" twice?
Cumulative Actual = Var LNBD = LASTNONBLANK('Table2'[Date],[A Total]) RETURN CALCULATE([A Total],FILTER(ALL('Table2'[Date]), 'Table2'[Date] <= LNBD))