Forum Discussion

sshanssun's avatar
sshanssun
Helper I
1 year ago
Solved

DAX Measure does not give average in total column

Hi - I have worker's data created using matrix table with DAX measure. However, the row and column total does not gives me the average value and showing total value. How do I change both row and colu...
  • vojtechsima's avatar
    vojtechsima
    1 year ago

    Hello, sshanssun ,

    the easiest solution would be to utilize a virtual table to first summarize it and then do average over it.

    Two new measures like this:

     

    EfficencyFixed = 
    var _virtualTable = SUMMARIZE(Data, Data[Emp Name], Data[Date].[Day], "value", [Efficiency])
    var _average = AVERAGEX( _virtualTable, [value])
    
    return _average
    ProdPerHourFixed = 
    var _virtualTable = SUMMARIZE(Data, Data[Emp Name], Data[Date].[Day], "value", [Prod per hour])
    var _average = AVERAGEX( _virtualTable, [value])
    
    return _average

     

     


    Please note, this will only work with Emp Name and Day of Date, as this is kinda hardcoded sumarization. It would be also better to have Calendar, so you don't have use [Date].[Day]