Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2014-04-22
1
Medium Priority
?
4,220 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

Plug and play, no additional software required!

The ATEN UE3310 USB3.1 Gen1 Extender Cable allows users to extend the distance between the computer and USB devices up to 10 m (33 ft). The UE3310 is a high-quality, cost-effective solution for professional environments such as hospitals, factories and business facilities.

Question has a verified solution.

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

As freelancing is becoming more and more common in the tech industry, certain obstacles are proving to be a challenge to those who are used to more traditional, structured employment. This article is meant to help identify such obstacles and offer a…
PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
The viewer will learn how to edit text. This includes Font, Spacing, Resizing, Color, and other special text options.
XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…

670 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