Forum Discussion
JulienETEX
4 years agoNew Member
How to calculate an average based on several filters in ROW
Hi Community I am getting my brain out of control 😑, I am searching for a solution to make a average calculation based on the same date and diffrent items with specific filters. To explain t...
- 4 years ago
Hi JulienETEX ,
Please check if this is what you want:
Avg = VAR Date_ = SUMMARIZE ( FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Code SAP BI] = "BAS-PURETE" && 'Table'[Valeur] > 86 ), [Date] ) RETURN AVERAGEX ( FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Date] IN Date_ && 'Table'[Code SAP BI] = "BAS-D90" ), [Valeur] )Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
leilaetaati
4 years agoFrequent Visitor
Similar to above one just different way of writting
cal =
var requiredDate=FILTER(All('TableData'),'TableData'[Cotrol]="BAS-PURETE Pureté Bascule" && 'TableData'[Value]>86)
Var requiredvalue=FILTER(All('TableData'),'TableData'[Cotrol]="BAS-D90 D90 Bascule" && 'TableData'[Date] in SELECTCOLUMNS( requiredDate,"Date",[Date]))
return
CALCULATE( AVERAGE([Value]),requiredvalue)