Hello Team Enterprise DNA and members, this is so weird and i have tried to solve this issue since yesterday but at a point where i can use some help…
All i am trying to do is to show CY(current year) alongside PY(previous year) using calculate/dateadd
Here the calc used
PYData =
CALCULATE(SUM(FactSales[AmountAvgUSD]),DATEADD(DimTime[Date],-1,YEAR))
This works fine and does produce right results as long as i have date( date dimension) in the table as shown in the image below
But as soon as i add month year (also from date dimension), i dont see the values for PY field anymore, although there is data
Although there is data
If i use date slicer as shown in the image, the PY function works fine
but as soon as i use ‘Year’ field (from date table - data type of year is string, tried to change the datatype to whole number but results are same), the PY data disappears…
Have tried 'SamePeriodLastYear and ParellelPeriod functions too and they are not producing desired result, anyone else here faced similar issues? thanks in advance…