Forum Discussion

Pawan's avatar
Pawan
Frequent Visitor
3 years ago
Solved

Previous Year DAX Calculation

Hi Team   Please can you help me on below issue. I have created a table like below in power bi. By default current month selection is applied and calculated CY and PY measures like below   CY= C...
  • tamerj1's avatar
    3 years ago

    Hi Pawan 

    please try

    PY =
    CALCULATE (
    [CY],
    FILTER (
    SAMEPERIODLASTYEAR ( 'Date'[Date] ),
    FORMAT ( [Date], "MMDD" ) <= FORMAT ( TODAY (), "MMDD" )
    )
    )