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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
great_AS
Frequent Visitor

WoW sales variation

Hello,

 

I can't get the WoW variation, can you please help me out?

 

I have an excel with:

Year: 2019-2022
Week: 1-52
KPIs: sales, profit revenue
Countries: yyyyy

 

First I need to create a table where I have Countries in the rows and I have to display the following:

  1. KPIs (absolute) last week (which is 49 and not 50 in my case as we get data one week delayed), one column for each KPI
  2. Variation (%) against last week-1 (so sales w49/salesw48-1), again one column for each KPI

 

I need to structure that in a way that changing the last week number as per function below , I change all others parameters.

LW = WEEKNUM(TODAY())-3

 

Thanks in advance,

Andrea

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @great_AS 

 

You can try measures like below

LW Sales = CALCULATE(SUM('Table'[Sales]),'Table'[Week]=WEEKNUM(TODAY())-3)
Sales Variation = DIVIDE([LW Sales],CALCULATE(SUM('Table'[Sales]),'Table'[Week]=WEEKNUM(TODAY())-4))-1

vjingzhang_0-1671784581664.png

For other KPIs, you can create similar measures. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it. Highly appreciate your Kudos!

View solution in original post

1 REPLY 1
v-jingzhang
Community Support
Community Support

Hi @great_AS 

 

You can try measures like below

LW Sales = CALCULATE(SUM('Table'[Sales]),'Table'[Week]=WEEKNUM(TODAY())-3)
Sales Variation = DIVIDE([LW Sales],CALCULATE(SUM('Table'[Sales]),'Table'[Week]=WEEKNUM(TODAY())-4))-1

vjingzhang_0-1671784581664.png

For other KPIs, you can create similar measures. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it. Highly appreciate your Kudos!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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