cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
RenataOGardner
Helper II
Helper II

How to calculate the sales same period 2 years but month.

Hi guys,

 

I'm trying to calculate the sales of the same period but 2 years ago.

I have tried the below, but it didn't work.

 

RenataOGardner_0-1620558730903.png

Many thanks!

1 ACCEPTED SOLUTION
negi007
Community Champion
Community Champion

@RenataOGardner You can create a measure like below

 

CALCULATE(SUM('Net Sales TY'),PARALLELPERIOD('Date'[Date],-2,YEAR))
 
first part is the sum of your value and second part is the date filter in the above dax. i hope this works for you.



Did I answer your question? Mark my post as a solution!
Appreciate your Kudos



Proud to be a Super User!


Follow me on linkedin

View solution in original post

2 REPLIES 2
negi007
Community Champion
Community Champion

@RenataOGardner You can create a measure like below

 

CALCULATE(SUM('Net Sales TY'),PARALLELPERIOD('Date'[Date],-2,YEAR))
 
first part is the sum of your value and second part is the date filter in the above dax. i hope this works for you.



Did I answer your question? Mark my post as a solution!
Appreciate your Kudos



Proud to be a Super User!


Follow me on linkedin

sayaliredij
Solution Supplier
Solution Supplier

Hi @RenataOGardner 

 

You can try following formula



Sales SamePeriod2Years = 

CALCULATE (
SUM(Sales[Net Price]),
DATEADD ('Date'[Date],-2,YEAR )
)

 

Regards,

Sayali

If this post helps, then please consider Accept it as the solution to help others find it more quickly

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors