Forum Discussion

GeraSanz11's avatar
GeraSanz11
Frequent Visitor
8 years ago
Solved

Variations with specific dates

Hi everyone   I'm stuck with a calculation, and i've been looking at the forums but i haven't found anything similar yet.   The database is as follows. I have 3 columns Year, id_Month and Num...
  • Zubair_Muhammad's avatar
    8 years ago

    GeraSanz11

     

    Try this MEASURE

     

    Measure =
    SUM ( TableName[Number] )
        - CALCULATE (
            SUM ( TableName[Number] ),
            FILTER (
                ALL ( TableName ),
                TableName[id-Month] = 12
                    && TableName[YEAR]
                        = SELECTEDVALUE ( TableName[YEAR] ) - 1
            )
        )
  • GeraSanz11's avatar
    GeraSanz11
    8 years ago

    This worked perfectly! 

     

    just did some adjustments like adding a report filter for the first year since it will not have a previous year to calculate 

     

     

    Thank you so much!