cancel
Showing results for
Did you mean:
Member

## percent change

How do I use a DAX formula to calculate and display the % change next to these figures?

1 ACCEPTED SOLUTION

Accepted Solutions
Super User

## Re: percent change

@Usates wrote:
Well, I have your book and I was looking through it too fast obviously before I closed it and posted here. I feel like an idiot now because your solution is pretty simple. Thanks!!

I know one thing, I need to start at page one and read it instead of trying to skim it.

Exactly!   And in fact if you read the first couple of pages, I explicity state "If you think you read this book and not do the exercises and still get value, let me tell you - you can't".  :-)

You need to go slower (and do some learning) so you can go faster :-)

* Matt is a Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
6 REPLIES 6
Super User

## Re: percent change

There is so much to learn if you want to be good at DAX.  You could create some measures like this.

Total Sales = sum(sales[Amount])

Total Sales Last Year = calculate([total sales],SAMEPERIODLASTYEAR(calendar[date]))

% Chg = divide([total sales] - [total sales last year],[total sales last year])

If you want a comprehensive coverage so you can learn to be good at DAX, take a look at my book.  http://xbi.com.au/learndax

* Matt is a Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
Member

## Re: percent change

Well, I have your book and I was looking through it too fast obviously before I closed it and posted here. I feel like an idiot now because your solution is pretty simple. Thanks!!

I know one thing, I need to start at page one and read it instead of trying to skim it.
Super User

## Re: percent change

@Usates wrote:
Well, I have your book and I was looking through it too fast obviously before I closed it and posted here. I feel like an idiot now because your solution is pretty simple. Thanks!!

I know one thing, I need to start at page one and read it instead of trying to skim it.

Exactly!   And in fact if you read the first couple of pages, I explicity state "If you think you read this book and not do the exercises and still get value, let me tell you - you can't".  :-)

You need to go slower (and do some learning) so you can go faster :-)

* Matt is a Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
Member

## Re: percent change

I'm on page 18.

Visitor

## Re: percent change

I have a little bit different issue.  I need to add percent change of Employee Amount by Year to this Matrix and have it work with my slicer.  I have tried several of the solutions I found online, but none seem to work for me.  Can you help..Microsoft MVP Matt?

Super User

## Re: percent change

I can't help you with specifics with the information you have provided.  All DAX formulas depend on the table structure and you haven't provided that information.  But I can tell you how to go about it.

Break the problem into steps.

The first step is to write a DAX formula that will give the result from Last Year.  ie 2013 number will appear against the year 2014.

Then the percent is easy.