Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
10 years ago
Solved

percent change

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

 

 




  • 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/

     

     

6 Replies

  • MattAllington's avatar
    MattAllington
    Icon for Community Champion rankCommunity Champion

    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 

    • Anonymous's avatar
      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.
      • MattAllington's avatar
        MattAllington
        Icon for Community Champion rankCommunity Champion



        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/