Forum Discussion

bvdm1980's avatar
bvdm1980
Icon for Helper II rankHelper II
2 years ago
Solved

need for last date with data for a project

So i'm back with another Q. I thought i had it working properly, untill there came an exception which made clear my dax isn't returning the correct data.  What is have, is a table with 1 column be...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi bvdm1980 ,

     

    Based on your description, I created this data:

     


    There are two methods to choose from here:

    Measure = 
    VAR _mindate =
        CALCULATE ( MIN ( 'Table'[Boekingsdatum] ), ALLSELECTED ( 'Table' ) )
    RETURN
        CALCULATE (
            SUM ( 'Table'[Gecorrigeerd tussentijds resultaat] )
                + SUM ( 'Table'[Gecorrigeerde verliesvoorziening] ),
            'Table'[Boekingsdatum] >= _mindate
        )
    

     

    Measure 2 = 
    SUMX(
        'Table',
        CALCULATE(
            SUM('Table'[Gecorrigeerd tussentijds resultaat]) + 
            SUM('Table'[Gecorrigeerde verliesvoorziening]),
            LASTDATE('Table'[Boekingsdatum])
        )
    )
    

     

    If your Current Period does not refer to this, please clarify in a follow-up reply.

     

    Best Regards,

    Clara Gong

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