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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.