Forum Discussion

Edmundas's avatar
Edmundas
Frequent Visitor
3 years ago
Solved

SUMPRODUCT in Power BI

Hi,

I have data table of three columns and need fourth column with results as it is shown in picture (column D). Tried lookupvalue, sumx but I don't have enough skills to do what I need. Any help please?

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Edmundas ,

    Please try this:

    Result = 
    SUMX(
        FILTER(
            ALL('Table'),
            'Table'[Date] =EARLIER ('Table'[Date])
                && 'Table'[Region] = EARLIER('Table'[Region])
        ),
        'Table'[Ratio]
    )

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Edmundas ,

    Please try this:

    Result = 
    SUMX(
        FILTER(
            ALL('Table'),
            'Table'[Date] =EARLIER ('Table'[Date])
                && 'Table'[Region] = EARLIER('Table'[Region])
        ),
        'Table'[Ratio]
    )

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

  • Edmundas's avatar
    Edmundas
    Frequent Visitor

    Awesome, it worked perfect. Thank you so much.