Forum Discussion

JulienETEX's avatar
JulienETEX
New Member
4 years ago
Solved

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...
  • Icey's avatar
    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.