Reputation: 101
I have a power BI measure which sort of works. I have a dataset with half hourly data (for one year) indicating either a value or 0. The measure calculates the average of each half hour across the year successfully, but it removes any period where the count is zero. Is there anyway I can add these back in. My script is below
averageValue = calculate(sum( 'datasetInput'[averageTraceForecast])/
CALCULATE (
count ( 'datasetInput'[averageTraceForecast]),
FILTER( ALL ( 'datasetInput'[averageTraceForecast] ),
'datasetInput'[averageTraceForecast]<0.0
)
))
Upvotes: 0
Views: 33