Forum Discussion
Anonymous
6 years agoNot applicable
SUMIF in Power BI
Hi all,
I have this table in Power BI,
CategoryTotal USD
| AA | 21 |
| AC | 23 |
| AG | 67 |
| AI | 44 |
| AO | 56 |
| AP | 9 |
| AE | 34 |
| AV | 12 |
| AJ | 89 |
| AZ | 7 |
| AI | 34 |
| AW | 88 |
| AQ | 9 |
| AC | 35 |
| AE | 87 |
| AG | 93 |
| AI | 98 |
| AP | 75 |
| AL | 49 |
| AS | 39 |
| AH | 57 |
| AP | 74 |
| AE | 29 |
| AI | 85 |
| AY | 48 |
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
- Tahreem24
Super User
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.- AnonymousNot 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
Super 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
Super User
CALCULATE (SUM(Table[Total Usd]), Table[Category]="AI")
I hope now it helps!