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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
ajve22
Frequent Visitor

Last year sales with monthly breakdown

Hi,

 

I am using this measure to calculate last year sales:

Sales LY =
CALCULATE (
    SUM ( 'Sales fact'[Item_Value] ),
   PREVIOUSYEAR( ( 'Date (sales fact)'[Order Date] )
))
 
it shows correct last year sales but when place this measure on a table along with months, it shows last year's total sales every month. I need last year sales as a total sales but also which should show monthly breakdown.
 
Year 2023MonthsLast Year Sales
  Total : 1000
 January 200
 February50
 March150
   
 
Thanks
2 REPLIES 2
AliNoorani
New Member

Hi, 

Try using SAMEPERIODLASTYEAR() instead of PREVIOUSYEAR().

I think that will solve your problem. 

@AliNoorani  it doesn't give total sales of last year, only shows last year's same month/period value. I need to show first total of last year then breakdown in the months.

Helpful resources

Announcements
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.