Solved

In Excel Power Pivot, calculate month-over-month growth using a measure and DAX

Posted on 2014-04-22
1
4,050 Views
Last Modified: 2014-06-03
In my Excel Power Pivot table I have a couple columns:

UsageMonth  (date datatype)
Consumed    (float number)

I want to calculate month-over-month growth. For example, if in January I consumed 100 and in February I consumed 110, 110/100-1 equals .10 or 10% growth.

If my table has this data:

UsageMonth   Consumed
1/1/2014          100
2/1/2014           110

I am thinking I should be able to create, in DAX, a measure named ConsumedPriorMonth. How do I do it?
0
Comment
Question by:RickInBellevue
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
RickInBellevue earned 0 total points
ID: 40109078
Okay, I figured out the answer to my own question.

To calculate month-over-month growth, the fundamental formula that underlies the solution is:

(Month2Usage - Month1Usage)/Month1Usage

The DAX-based answer has two parts:

Part 1: Create a measure that calculates the prior month's usage:

PriorMonthUsage:=CALCULATE(SUM(Usage),DATEADD(UsageData[UsageMonth],-1,MONTH))


Part 2:  Compute month-over-month growth:

MoMGrowth:=IF([PriorMonthUsage],(SUM([Usage])-[PriorMonthUsage])/[PriorMonthUsage],BLANK())

The IF/BLANK parts handles the case where there is no usage.
0

Featured Post

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Outline Suppose you have some simple text based data in Excel that you would like to display as a PowerPoint presentation. Of course it would be possible to write some fairly complex VBA code that created a new slide for each line of the Excel data…
The advancement in technology has been a great source of betterment and empowerment for the human race, Nevertheless, this is not to say that technology doesn’t have any problems. We are bombarded with constant distractions, whether as an overload o…
This video teaches the viewer how to align pictures around text while keeping the text properly aligned in the document.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

634 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question