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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
garvicasas
Helper I
Helper I

sameperiodlastyear

Hi, I'm relatively new to Power Bi and for starting i wanted to do a tutorial. In there they ask you to calculate the total sales and the last year sales, for that they give you the formula:

 

  • Total Sales = SUM(Sales[Revenue])
  • LY Sales = CALCULATE([Total Sales],SAMEPERIODLASTYEAR('Date'[Date]))

 

but both give me the same result. in fact, i tried this

 

 

  • Total Units = SUM(Sales[Units]) 
  • LY Total Units = CALCULATE([Total Units],SAMEPERIODLASTYEAR('Date'[Date])

but this two also give me the same value( between this two, not with the firsts ones)

I'm afraid its a mess with the funtion CALCULATE or SAMEPERIODLASTYEAR, but i couldnt get any clue.

 

BTW, i tried also without result LY Sales = CALCULATE([Total Sales];SAMEPERIODLASTYEAR(DATEADD('Date'[Date];-1;YEAR )))

 

Any help would be apreciated, thanks

 

1 ACCEPTED SOLUTION
garvicasas
Helper I
Helper I

its solved. it was the fact of not making a relationship between the sales[Date] and the Date column

View solution in original post

1 REPLY 1
garvicasas
Helper I
Helper I

its solved. it was the fact of not making a relationship between the sales[Date] and the Date column

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.