Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Creating a Current Month Column in a Report

Hello all!   I am looking to create a Month over Month column in my Report. I am looking it to be where the most recent month available is 1, and month before that is 2, and the month before that o...
  • v-chenwuz-msft's avatar
    v-chenwuz-msft
    4 years ago

    Hi Anonymous ,

     

    Maybe you can try this expression:

    Column =
    VAR _DIFF =
        DATEDIFF (
            DATE ( 2000 + VALUE ( RIGHT ( [READY_DATE], 2 ) ), VALUE ( LEFT ( [READY_DATE], 2 ) ), 1 ),
            TODAY (),
            MONTH
        )
    RETURN
        IF ( _DIFF > 12, 0, _DIFF )
    

     

    Result:

     

    Pbix in the end you can refer.

    Best Regards

    Community Support Team _ chenwu zhu

     

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