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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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 an 8 times 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 an 8 times 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 an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

 

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 an 8 times 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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.