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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.