Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Charam
Frequent Visitor

How to get the difference between cumulative sales of 2017 and cumulative sales of 2016

Hi,

  

   I'm getting trouble to find out the differnece between cumulative sales of 2017 and 2016. I've Invoice date and total net price in my table. Can you guys help me out to get this done.

 

Thank you

2 ACCEPTED SOLUTIONS
Ashish_Mathur
Super User
Super User

Hi,

 

Try this

 

  1. Create a calendar table with running dates
  2. In that table, extract Year in another column using the =YEAR(Calendar[Date]) formula
  3. Create a relationship from the Date column of your Data Table to the Date column of your Calendar table
  4. Drag the Year column from the Calendar table to your visual
  5. Write the following calculated field formula

 

Total Revenue=SUM(Data[Amount])

=CALCULATE([Total Revenue],PREVIOUSYEAR(Calendar[Date]))

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

That Works Perfect.. Thank you..!!

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

 

Try this

 

  1. Create a calendar table with running dates
  2. In that table, extract Year in another column using the =YEAR(Calendar[Date]) formula
  3. Create a relationship from the Date column of your Data Table to the Date column of your Calendar table
  4. Drag the Year column from the Calendar table to your visual
  5. Write the following calculated field formula

 

Total Revenue=SUM(Data[Amount])

=CALCULATE([Total Revenue],PREVIOUSYEAR(Calendar[Date]))

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

That Works Perfect.. Thank you..!!

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Ashish,

 

   If you don't mind, Can you help me with the below link..

https://community.powerbi.com/t5/Desktop/how-to-get-customers-have-sales-more-than-threshold-amount/...

 

Thank you..Smiley Happy

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.