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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Calculate percent change between monthly and all time data

Hello all, could really use some help here. What I am trying to do is, by product, calculate the percent change between the percent of sales by month and the all-time percent of sales. Products are located in the items table and sales info is in the sales table, licked by item (multiple items fall into different product categories).

 

Here is what I can create right now:

table 1.PNG

 

 

What I'd like to compare it to is something like this. Where each product has its all-time percent of revenue, regardless of month:table two.PNG 

Then I would like to find the percent change. So for product one in January the calculation would be (22.65 - 18.85) / 18.85 = 20.1

 

Thanks!

 

1 REPLY 1
HashamNiaz
Solution Sage
Solution Sage

Hi @Anonymous !

You can calculate the percentage contribution using below DAX;

 

% Contribution = 
    VAR _TotalYear = CALCULATE(Table[Contribution], ALLEXCEPT('Calendar', 'Calendar'[Date].[Year]))
RETURN
    DIVIDE( (Table[Contribution] - _TotalYear), _TotalYear)


It conside Table[Contribution] is a measure in your current model, where you are calcuating Average or Percentage for current month, use the measure and then calculate the Year Avergae or Percentage. Then finally divide it to get percentage contribution for each element.

 

Regards,

Hasham

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.