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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Gangasaniravi
Helper I
Helper I

Variance sales between rows

Hi all , 

Looking for difference of sales available between rows.

DateSales
Jan 21100
Feb 21120
Mar 21150
Apr 21 
May 21350
Jun 21 
July 21100

 

Output

 Jan 21Feb 21Mar 21Apr 21May 21Jun 21Jul 21
sales100120150 350 100
Varience-20-30-200 250  
2 REPLIES 2
Gangasaniravi
Helper I
Helper I

Hi @Jonvoge  Thank you for the help, Need to show variance of slaes last available sales and current available sales, if there is no sales then variance also blank .

Jonvoge
Super User
Super User

Hi.

 

You'll can use a Calculated Measure to return the Previous Period's sales, and compare it with your Current Period Sales. 

 

If you are using a Date Table, try the following Measure:

Variance = SUM('Table'[Sales]) - CALCULATE(SUM('Table'[Sales]), DATEADD('Table'[Date], -1, MONTH))

 

If you are not using a Date Table, you should implement one according to a guide like this:

How to Create a Date Table in Power BI | Master Data Skills + AI (enterprisedna.co)


_____________________________________________________
I hope my comment was helpful.
If your question was answered, please mark your post as 'Solved' and consider giving me a 'Thumbs Up'.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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