Forum Discussion

karinafreitass's avatar
karinafreitass
Helper III
5 years ago
Solved

Last month measure

Hello Guys, how are you? Could someone help me find a solution for the following: I have the following relationship between tables below in table: The calculated "MRR fim do mes" colu...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi karinafreitass ,

     

    I made a simple sample.

    First of all, there can be no relationship between the two tables. If it is relevant, the value of the previous month cannot be obtained.

     

    Measure =
    IF (
        CALCULATE (
            MAX ( 'Table'[Data] ),
            FILTER (
                ALL ( 'Table' ),
                [Data]
                    = DATESINPERIOD (
                        'dCalendar'[Data],
                        SELECTEDVALUE ( dCalendar[Data] ),
                        -1,
                        MONTH
                    )
            )
        )
            = MAX ( 'Table'[Data] ),
        1
    )
    

     

     

    Then put the measure into visual level Filters and set Show items when the value is 1.

     

     

    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.