Forum Discussion

bhelou's avatar
bhelou
Icon for Responsive Resident rankResponsive Resident
3 years ago
Solved

LAST NON BLANK

Dear , 

I have this measure ( below ) , calculation for it in the rows inside the table is correct , but in the summation it is refereing to the last non blank value that i have , it is not summing it up , kindly if you can help with modifying the measure , thanks 

Cost =
VAR COST =
    ROUND(CALCULATE (
        LASTNONBLANK(
            XXAWPT_FA_DEPRN_SUMMARY[ADJUSTED_COST],
            XXAWPT_FA_DEPRN_SUMMARY[ADJUSTED_COST]
        ),
        XXAWPT_FA_DEPRN_SUMMARY[DEPRN_SOURCE_CODE] = "DEPRN",
        FILTER (
            XXAWPT_FA_DEPRN_SUMMARY,
            XXAWPT_FA_DEPRN_SUMMARY[DEPRN_RUN_DATE]
                = MAX ( XXAWPT_FA_DEPRN_SUMMARY[DEPRN_RUN_DATE] ))),0)
RETURN
    ROUND(CALCULATE (
        Cost,
        FILTER (
            ALL ( '*Dates' ),
            '*Dates'[Date]
                <= MAX ( '*Dates'[Date] )
        )
    ),0)

Thank you 


3 Replies