Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Average by Field bases on other field value

Good morning,   I'm quite new on DAX so I was wondering if someone can help me solving this issue…   Business: maritime public passenger transportation.   The DB is organized by Booking code th...
  • v-eachen-msft's avatar
    6 years ago

    Hi Anonymous ,

     

    Try the following DAX:

    Ocupação Média por Navio(UnderConst) =
    AVERAGEX (
        ALLEXCEPT (
            vw_Report_REPLICA_Invoices_Details;
            vw_Report_REPLICA_Invoices_Details[VesselName]
        );
        SUM ( vw_Report_REPLICA_Invoices_Details[NumPassageiros] )
    )

    If it doesn't work, you could share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to OneDrive for Business and share the link here.