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

View all the Fabric Data Days sessions on demand. View schedule

Reply
miguel_tc_27
Regular Visitor

Sales Growth

Hello,

I have a problem related to sales growth calculations. I want to calculate the sales growth and I have ['Competition'][Costco ($)] with the revenues and ['Competition'][Year] with only the year (2014 for example). I need a metric providing me with the growth in percentage of these revenues (for instance (revenues in 2015-revenues in 2014)/revenues in 2014).

Thanks!

6 REPLIES 6
devanshi
Helper V
Helper V

salesgrowth =

VAR pervoiusyears=CALCULATE(SUM(['Competition'][Costco ($)] ),SAMEPERIODLASTYEAR(['Competition'][Year]))

RETURN

   DIVIDE((['Competition'][Costco ($)] )-perviousyear,perviousyear)

But the thing is Year is not of date type, it is an integer such as 2014. Thus SAMPERIODLASTYEAR does not work correctly.

try this formula:

salesgrowth =

VAR pervoiusyears=CALCULATE(SUM(['Competition'][Costco ($)] ),DATESYTD(['Competition'][Year]))

RETURN

   DIVIDE((['Competition'][Costco ($)] )-perviousyear,perviousyear)

Has the same problem as before.

salesgrowth =

VAR pervoiusyears=CALCULATE(SUM(['Competition'][Costco ($)] ),['Competition'][Year]=(EARLIER(['Competition'][Year])-1))

RETURN

   DIVIDE((['Competition'][Costco ($)] )-perviousyear,perviousyear)

The function EARLIER is not accepting that. It says the parameter is not correct

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.