cancel
Showing results for
Did you mean:
Member

## SUMIF in Power BI

How to use =SUMIFS for below table in power bi.

=SUMIFS(PRIOR MONTHS,REGION,SALES REGION,UI,PID)

 Prior Months Region Sale Region UI PID 0 Europe Europe ABC ABC 12 Europe Europe XYZ XYZ 12 Europe Europe OPQ OPQ 2.5 Americas Americas LKM LKM 2.5 Americas Americas PKR PKR 2.5 Americas Americas JKL JKL 2.5 Americas Americas GUJ GUJ 2.5 Americas Americas RAJ RAJ
1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft

## Re: SUMIF in Power BI

Hi @PoweBI,

You can create a measure similar to below:

```SumValue =
CALCULATE (
SUM ( Table[PriorMonths] ),
FILTER (
ALLSELECTED ( Table ),
SELECTEDVALUE ( Table[Region] ) = "Europe"
&& SELECTEDVALUE ( Table[SaleRegion] ) = "Europe"
&& SELECTEDVALUE ( Table[UI] ) = "ABC"
&& SELECTEDVALUE ( Table[PID] ) = "ABC"
)
)```

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 REPLIES 4
Super User IV

## Re: SUMIF in Power BI

Generally SUMIF means that you are summing based upon some condition. The general replacement for SUM if is to use a CALCULATE with a SUM and a FILTER.

### I have book! Learn Power BI from Packt

Proud to be a Datanaut!

Member

## Re: SUMIF in Power BI

You can also use a SUMX along these lines

```SUMX(
FILTER(
Table1,
<Conditions Here>
),
Table1[Column to Sum]
)```
Microsoft

## Re: SUMIF in Power BI

Hi @PoweBI,

You can create a measure similar to below:

```SumValue =
CALCULATE (
SUM ( Table[PriorMonths] ),
FILTER (
ALLSELECTED ( Table ),
SELECTEDVALUE ( Table[Region] ) = "Europe"
&& SELECTEDVALUE ( Table[SaleRegion] ) = "Europe"
&& SELECTEDVALUE ( Table[UI] ) = "ABC"
&& SELECTEDVALUE ( Table[PID] ) = "ABC"
)
)```

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Member

## Re: SUMIF in Power BI

thank yo so much Yuliana.

Announcements

#### Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

#### Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

#### January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors
Top Kudoed Authors