Forum Discussion
DAX Measure does not give average in total column
- 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 _averageProdPerHourFixed = 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]
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 _averageProdPerHourFixed =
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]
Hi vojtechsima - It worked like a charm. Thank you so much!
- vojtechsima1 year ago
Super User
sshanssun happy to help. kudos appretiated.