Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Calculate average between double counting rows

Requested Year Customer Name Project Processor Number Ecap Price ($) Ceiling Volume WeightedEcap 2019 Beta A1 XXX1 $770  204,000  157080000 2019 Theta A1 XXX1 $770  200,000 ...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Anonymous ,

    You can create a calculated column as below to get it, please find the details in the attachment.

    WeightedEcap = 
    VAR _avgcvol =
        CALCULATE (
            AVERAGE ( Table1[Ceiling Volume] ),
            FILTER (
                'Table1',
                'Table1'[Requested Year] = EARLIER ( Table1[Requested Year] )
                    && 'Table1'[Project] = EARLIER ( 'Table1'[Project] )
                    && 'Table1'[Processor Number] = EARLIER ( 'Table1'[Processor Number] )
            )
        )
    RETURN
        _avgcvol * 'Table1'[Ecap Price ($)]

     

    If the above one is not your expected result, please provide more raw data in your table with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

    How to upload PBI in Community

    Best Regards