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
Highlighted
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.

 

Highlighted
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
Announcing the New Spanish Forum

Announcing the New Spanish Forum

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

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

‘Better Together’ Integration Forum Launch

‘Better Together’ Integration Forum Launch

We've launched a how-to forum where you can learn about how Power BI integrates with other Power Platform products.

Top Solution Authors
Top Kudoed Authors