Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

SUMIF in Power BI

Hi all,

 

I have this table in Power BI,

 

CategoryTotal USD

AA21
AC23
AG67
AI44
AO56
AP9
AE34
AV12
AJ89
AZ7
AI34
AW88
AQ9
AC35
AE87
AG93
AI98
AP75
AL49
AS39
AH57
AP74
AE29
AI85
AY48

 

Now, I would like to create a graph which will show the sum of only "AI". I would like to do the sum of AI like we do it in Excel using the function SUMIF. But, I am unable to do so in Power BI. 

Can someone please help me?

 

Appreciate your help.

 

Regards,

  • CALCULATE (SUM(Table[Total Usd]), Table[Category]="AI")

    I hope now it helps!

4 Replies

  • Please give a try to below measure:
    Calculate (sum(total usd), category ="AI")

    Please give Kudos to this effort and accept this as a solution if it helps you.
    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Tahreem24 ,

       

      Are you sure about the way you have written the function? I am afraid whether it is right, because it is showing me error.

       

      Regards

      • Tahreem24's avatar
        Tahreem24
        Icon for Super User rankSuper User
        Hi Deepak,

        I hope there is auto text completion functionality available in your power bi desktop. I just gave you structure of dax formula.

        Just enter the name of column in given dax function.
    • Tahreem24's avatar
      Tahreem24
      Icon for Super User rankSuper User
      CALCULATE (SUM(Table[Total Usd]), Table[Category]="AI")

      I hope now it helps!