cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
marianamarques Helper I
Helper I

Comparing full current month of last year's sales

Hello,

Our sales team receives a report every week showing the YTD, Last Year YTD, MTD and LY MTD sales, but they would like to see the sales of the whole current month of last year instead of MTD.
Does anyone know how I could do that in a dynamic way?

1 ACCEPTED SOLUTION

Accepted Solutions
Moderator v-sihou-msft
Moderator

Re: Comparing full current month of last year's sales

@marianamarques

 

If you want to calculate same month last year total, you just need to use PARALLELPERIOD() function and set the interval on month level.

 

= CALCULATE(SUM('Table'[Amount]),PARALLELPERIOD('Table'[Date],-12,MONTH))

Regards,

 

View solution in original post

2 REPLIES 2
NielsJ
New Member

Re: Comparing full current month of last year's sales

Hello,

 

I am fairly new to Power BI so bear that in mind. You could create a column that looks at the month you're in and marks the data in or out. If your data set is updated each day with the current sales it would show the total current months sales for each year and only (Obviously) the MTD sales current year.  

 

Step 1: Create new column.

 

Step 2: Paste the following DAX: IsCurrentMonth = IF(MONTH(Sales[Posting Date]) = MONTH(TODAY()); "Yes"; "No")

 

Step 3: Filter the page or visuals with the column "Yes".

 

I hope this is the answer you are looking for.

 

Moderator v-sihou-msft
Moderator

Re: Comparing full current month of last year's sales

@marianamarques

 

If you want to calculate same month last year total, you just need to use PARALLELPERIOD() function and set the interval on month level.

 

= CALCULATE(SUM('Table'[Amount]),PARALLELPERIOD('Table'[Date],-12,MONTH))

Regards,

 

View solution in original post

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors