Forum Discussion
Cbishop
6 years agoFrequent Visitor
SUMIFS function in Power BI
Hi, I am stuck on how I can apply the following SUMIFS formula into Power BI =E2/SUMIFS(E:E,A:A,A2,B:B,B2)*100 Re-worked with column names (=Cost 2020/21 - Plan/SUMIFS(Cost 2020/21 - Plan,Gr...
Anonymous
6 years agoNot applicable
Hi Cbishop
Just like AllisonKennedy and PaulDBrown replied before we can achieve the goal by measure.
I build a table like yours in power bi to have test.
I build a measure to calculate Cost2020/21-Plan / sum{Cost2020/21-Plan (group = group month = month) }*100:
Measure =
VAR _A =
SUM ( 'Table'[Cost 2020/21 - Plan] )
VAR _B =
SUMX (
FILTER (
ALL ( 'Table' ),
'Table'[Group] = MAX ( 'Table'[Group] )
&& 'Table'[Month] = MAX ( 'Table'[Month] )
),
'Table'[Cost 2020/21 - Plan]
)
RETURN
DIVIDE ( _A, _B ) * 100
Result:
If you want to calculate other like sum value filtered by (EXP Group 2 = EXP Group 2 and National Specialty = National Specialty and Month = Month).
You may refer to the formula _B in my measure, like :
_C =
SUMX (
FILTER (
ALL ( 'Table' ),
'Table'[EXP Group2] = MAX ( 'Table'[EXP Group2] )
&& 'Table'[Month] = MAX ( 'Table'[Month] )
&& 'Table'[National Specialty] = MAX ( 'Table'[National Specialty] )
),
Value
)
You can download the pbix file from this link: SUMIFS function in Power BI
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Rico Zhou