Forum Discussion

janalu's avatar
janalu
Regular Visitor
7 years ago

Sumif formula

Hello, I am trying to replicate sumif formula from excel highlighted in green below to power Bi but it does not work. Could you please advice? Formula form excel is: =SUMIF($E$2:$E$38;">="&E2;$E$2:$E$38)/SUM($E$2:$E$38)

 

Many thanks

 

Jana

 

7 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    To emulate SUMIF you use CALCULATE with a SUM and a FILTER clause. 

  • Hi,

     

    Looks like you want to compute cumulative % i.e. F2 = F1+E2 and dragged down.  Am i correct?  Share the link from where i can download your PBI file.

  • Anonymous's avatar
    Anonymous
    Not applicable

    As I understand, you want to get running Total of your Sales percentage  in Total Percentage.

     

    You can achieve it through quick measure option.

     

    I have also pasted the code below.

     

    Sales% running total in Sales% =
    CALCULATE(
        SUM('Table1'[Sales%]),
        FILTER(
            ALLSELECTED('Table1'[Sales%]),
            ISONORAFTER('Table1'[Sales%], MAX('Table1'[Sales%]), ASC)
        )
    )