Forum Discussion
SUMIF in Power BI Desktop?
- Anonymous9 years ago
Hi sachingarg,
If your table has no index column, please firstly add index column to your column in Query Editor of Power BI Desktop. Then in Power BI Desktop Report view, create the following calculated columns by right-clicking your table and selecting “New Column”, this way you will get expected result in a table visual.
SumColumn = CALCULATE(SUM(Table[Lost Service]),ALLEXCEPT(Table,Table[Sales Order Number]))
Service Level Met = IF(Table[SumColumn]<1,"Achieved","Lost")
Thanks,
Lydia Zhang
Hi sachingarg,
You need to use the CALCULATE function please refer to https://msdn.microsoft.com/en-us/library/ee634825.aspx.
If you have any questions can you please share a sample of you data in order to give you a measure example that you can use.
Regards,
MFelix
Hi,
Thanks I have added the snapshot of the data on how it is working in EXCEL but unable to get my head around how i can do this in Power BI
- MFelix9 years ago
Super User
Hi sachingarg,
Looking at your information I want to understand better what you need to get.
You want to have the Service Level Met column filled with Achieve/Lost based on the fact that the column lost service is 0 or 1?
I understand you formulas but not the result you want to achieve, so I can help you better.
Regards,
MFelix