Forum Discussion

Puja's avatar
Puja
Icon for Helper III rankHelper III
3 years ago
Solved

Need guidance

Hello all ,    Please give me some guidence on how to get previous year month dates. i have a date table with Rank like  below      If I select 12/3/2022, the result should be rank 1    ...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Puja ,

    Please refer to my pbix file.

    Measure =
    VAR _1 =
        SELECTEDVALUE ( data[Date] )
    VAR _format =
        FORMAT ( _1, "MMM" )
    VAR _YEAR =
        YEAR ( _1 )
    RETURN
        IF (
            _1 = SELECTEDVALUE ( 'Table'[Date] ),
            1,
            IF (
                _format = SELECTEDVALUE ( 'Table'[ Month] )
                    && _YEAR <> SELECTEDVALUE ( 'Table'[year_colun] ),
                1
            )
        )
    

    How to Get Your Question Answered Quickly 

     

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

     

    Best Regards
    Community Support Team _ Polly

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