Forum Discussion
Anonymous
4 years agoNot applicable
Parallelperiod not working as expected
Hello, With Covid 19 , I am trying to compare monthly "numbers" with the ones from last year but also from the same period in 2019 ... My table is only 2 columns : date & number1 I am adding ...
- Anonymous4 years ago
Hi Anonymous ,
Here are the steps you can follow:
1. Create calculated column.
number2 = var _current='Table'[number1] var _last=CALCULATE(SUM('Table'[number1]),FILTER(ALL('Table'),'Table'[Date]=DATE( YEAR(EARLIER('Table'[Date]))-1,MONTH(EARLIER('Table'[Date])),DAY(EARLIER('Table'[Date]))))) return _current-_last2. Result:
If I have misunderstood your meaning, please provide your desired output and your pbix file without privacy information.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Samarth_18
4 years agoCommunity Champion
Anonymous Yes try to use it.
Anonymous
4 years agoNot applicable
number2 = CALCULATE(SUM(MyTable[number1]), PARALLELPERIOD('Calendrier'[Date],( ( 2019 - year(MyTable[Date]) ) * 12) ,MONTH) ) is giving the same result ... only resylts for 2019 dates !!!
and when I try
number2 = CALCULATE(SUM(MyTable[number1]), PARALLELPERIOD('Calendrier'[Date],( ( 2019 - year('Calendrier'[Date]) ) * 12) ,MONTH) ) ... I have power bi error saying too many values in Calendrier ...
- Samarth_184 years agoCommunity Champion
Anonymous Do you want to calculate 2019 and previous year on the same column?