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]
Hi, Thank you for the response, please see if the below link is working to access pbix file,
https://drive.google.com/file/d/10Ln1kpnttDV-uHxzaUg25ZjEjKqlHPpU/view?usp=drivesdk
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]
- sshanssun1 year agoHelper I
Hi vojtechsima - It worked like a charm. Thank you so much!
- vojtechsima1 year agoSuper User
sshanssun happy to help. kudos appretiated.