Forum Discussion
JamesBurke
2 years agoHelper III
Daily Average
Hi all , Daily Average all = CALCULATE( AVERAGEX(
VALUES('Date'[Day ID]),
[Total Kwh]
),ALL('Date')) Above Is the Dax forumla i'm using as a average of all days and then comp...
- 2 years ago
Try a measure like this. You could use ALLSELECTED instead of ALL if you want a date slicer/filter to apply to the calculation.
Daily Average by Day Name = VAR vTable = CALCULATETABLE ( VALUES ( 'Date'[Date] ), ALL ( 'Date' ), 'Date'[Day Name] = MAX ( 'Date'[Day Name] ) ) VAR vResult = AVERAGEX ( vTable, [Total Kwh] ) RETURN vResult
DataInsights
2 years agoSuper User
Try a measure like this. You could use ALLSELECTED instead of ALL if you want a date slicer/filter to apply to the calculation.
Daily Average by Day Name =
VAR vTable =
CALCULATETABLE (
VALUES ( 'Date'[Date] ),
ALL ( 'Date' ),
'Date'[Day Name] = MAX ( 'Date'[Day Name] )
)
VAR vResult =
AVERAGEX ( vTable, [Total Kwh] )
RETURN
vResult
- JamesBurke2 years agoHelper III