cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Microsoft
Microsoft

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.

 

Microsoft
Microsoft

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
‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

April 2020 Community Highlights

April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Top Solution Authors
Top Kudoed Authors