cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

percent change

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

 

 

pic.gif

1 ACCEPTED SOLUTION




@Anonymous 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 🙂  

https://betterlifecoachingblog.com/2010/10/11/sharpening-the-saw-a-story-about-continued-development/

 

 



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

View solution in original post

6 REPLIES 6

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.
Anonymous
Not applicable

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.




@Anonymous 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 🙂  

https://betterlifecoachingblog.com/2010/10/11/sharpening-the-saw-a-story-about-continued-development/

 

 



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

View solution in original post

 

matrix and slicer.PNG

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?

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.

 

Read my article about time intelligence in DAX and it will help you



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

I'm on page 18.  🙂

IMG_0313.JPG

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!