Desktop

Highlighted
Frequent Visitor
Posts: 10
Registered: ‎10-05-2016

Compare Current and Previous Year

I'm clueless where to start. I'm happy to provide more info. needed.

I have a report I want to show current year by month (total) and I want to compare values with the previous years by month.

On Excel, I used the Value Field Settings to show values as Difference from Based field [Year] and Base items [next]

Accepted Solutions
Community Support Team
Posts: 7,490
Registered: ‎08-14-2016

Re: Compare Current and Previous Year

Hi @Zwakele,

You can take a look at below sample.

Table: Date,Amount.

Add a measure to calculate previous data.Pervious Year Total =
var currDate=MAX([Date])
return
SUMX(FILTER(ALL(Shipments),Shipments[Date]>=DATE(YEAR(currDate)-1,1,1)&&Shipments[Date]<=DATE(YEAR(currDate)-1,12,31)&&MONTH([Date])=MONTH(currDate)),[Total Revenue])

Improve % = FORMAT( DIVIDE(SUM(Shipments[Total Revenue])-[Pervious Year Total],[Pervious Year Total],0 ),"Percent")

Create a matrix to show the result.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

For learning resources/Release notes, please visit: | |

All Replies
Community Support Team
Posts: 7,490
Registered: ‎08-14-2016

Re: Compare Current and Previous Year

Hi @Zwakele,

You can take a look at below sample.

Table: Date,Amount.

Add a measure to calculate previous data.Pervious Year Total =
var currDate=MAX([Date])
return
SUMX(FILTER(ALL(Shipments),Shipments[Date]>=DATE(YEAR(currDate)-1,1,1)&&Shipments[Date]<=DATE(YEAR(currDate)-1,12,31)&&MONTH([Date])=MONTH(currDate)),[Total Revenue])

Improve % = FORMAT( DIVIDE(SUM(Shipments[Total Revenue])-[Pervious Year Total],[Pervious Year Total],0 ),"Percent")

Create a matrix to show the result.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

For learning resources/Release notes, please visit: | |