Forum Discussion

rbowen's avatar
rbowen
Helper III
1 year ago
Solved

Column Total Averages Not Quite Correct in Matrix

Greetings All -    I'm building a matrix which shows a moving 8 week gross margin percentage by store, department and end of business week date - first screenshot below. The individual percentages ...
  • rbowen's avatar
    rbowen
    1 year ago

    ToddChitt pankajnamekar25 Shahid12523 Ashish_Mathur 

     

    I was able to get each row to provide a simple average by doing the following:

     

    TotalSales = SUM(Sales[Net Sales])

    TotalMargin = SUM(Sales[GrossMargin])

    Margin% = DIVIDE([TotalMargin],[TotalSales])

     

    The measure that made the difference was this:

     

    AVERAGEX(VALUES('Dates'[EOW]), [Margin%]))

     

    It appears the issue was at least somewhat related to the non-additive measure issue (as much as I understand it). Wish there was a way to toggle that behavior in BI Desktop but at least it's working now. Thank you all so much for your suggestions and help, much appreciated. ToddChitt, many thanks for the pointers on the Visual Calcs. I'll be reading up on that much more for future use. 

     

    Cheers!