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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
bhelou
Responsive Resident
Responsive Resident

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 

1123.png
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

3 REPLIES 3
bhelou
Responsive Resident
Responsive Resident

Thank you very much it worked , 1 M kudos , thank you @amitchandak 

v-stephen-msft
Community Support
Community Support

Hi @bhelou ,

 

This is a common issue.

I tried to reproduce your issue. The total  should be 7 not 5.

vstephenmsft_0-1672651312821.png

You can create a new measure using ISINSCOPE to solve.

Measure = IF(ISINSCOPE('Table'[Month]),[Cost],SUMX('Table',[Cost]))

vstephenmsft_1-1672651364324.png

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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