Forum Discussion
robertofilho
6 years agoRegular Visitor
WROG RESULT IN AVERAGE
DATA BASE (each problem that is find, the system sum of then on the data base, line by line) POSITON QTD DATE TILT 1 01/0...
- 6 years ago
Anonymous
6 years agoNot applicable
HI robertofilho,
AFAIK, power bi calculated and aggregate on existing records, but your '0' records did not really exist in your data table. (it is expanding by pivoted effect and column category, power bi calculate on real records count instead of field count)
You can try to use the following measure formula on value filed to replace the original data field:
Measure =
IF (
ISFILTERED ( T2[DATE] ),
SUM ( T2[QTD] ),
DIVIDE (
CALCULATE ( SUM ( T2[QTD] ), VALUES ( T2[POSITON] ) ),
CALCULATE ( COUNTROWS ( VALUES ( T2[DATE] ) ), ALLSELECTED ( T2 ) )
)
)
Regards,
Xiaoxin Sheng