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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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