Forum Discussion
Pawan
3 years agoFrequent Visitor
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...
amitchandak
3 years agoSuper User
Pawan ,
PY = CALCULATE([CY], SAMEPERIODLASTYEAR('Date'[Date]), format([Date],"MMDD") <= format(today() ,"MMDD") )
Pawan
3 years agoFrequent Visitor
amitchandak thank you for your reply. The above solution works only for complete year(2022) selection. But is breaking when we select month or quarter. The measure should be dynamic based on Date selection.