Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
HI Team.
I appreciate the help in advance.
I would like to replicate a SUMIFS function in PBI. My sample data is shown below. In the example, my answer would be 6. I would like a new column to list the SUMIFS value for all rows in my real table. How can I achieve this in PBI? I am slightly familiar with the GROUP BY button in Power Query but I want to keep my original table in tact.
Thanks, FB
Solved! Go to Solution.
Hi @FOXYBARK , can you try this (calculated column):
sumif ex =
CALCULATE(SUM('Table'[Count]),FILTER('Table','Table'[Group] = EARLIER('Table'[Group]) && 'Table'[Party] = EARLIER('Table'[Party])))
Hi @FOXYBARK ,
Here I suggest you to create a measure as below.
How many from Group B,Party equal to Homecoming =
CALCULATE (
SUM ( 'Table'[Count] ),
FILTER (
'Table',
'Table'[Group] = "B"
&& 'Table'[Party] = "Homecoming"
)
)
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @FOXYBARK ,
Here I suggest you to create a measure as below.
How many from Group B,Party equal to Homecoming =
CALCULATE (
SUM ( 'Table'[Count] ),
FILTER (
'Table',
'Table'[Group] = "B"
&& 'Table'[Party] = "Homecoming"
)
)
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I need an entire column, not a measure. I hit Solved by mistake.
FB
[Your Column] = // calc column
// Don't use CALCULATE in calculated columns
// as this slows down calculations tremendously
// especially on big tables.
var vCurrentParty = T[Party]
var vCurrentGroup = T[Group]
var Output =
sumx(
filter(
T,
T[Party] = vCurrentParty
&&
T[Group] = vCurrentGroup
),
T[Count]
)
return
Output
Hi @FOXYBARK , can you try this (calculated column):
sumif ex =
CALCULATE(SUM('Table'[Count]),FILTER('Table','Table'[Group] = EARLIER('Table'[Group]) && 'Table'[Party] = EARLIER('Table'[Party])))
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
18 | |
15 | |
11 | |
11 | |
8 |
User | Count |
---|---|
24 | |
18 | |
12 | |
11 | |
10 |