Forum Discussion
DAX SUMIF Equivalent within Calculated Column to create recurring results
- Anonymous2 years ago
Hi TonyBarron ,
I have created a simple sample, please refer to my pbix file to see if it helps you.
Create a column.
Column = VAR _edb = ( 'Table'[DomesticPrice] * 'Table'[Quantity] ) / 'Table'[BOMQty] VAR _leftf = LEFT ( 'Table'[ComponentGroup], 2 ) VAR _leftf3 = LEFT ( 'Table'[ComponentGroup], 3 ) VAR _sumif = CALCULATE ( SUM ( 'Table'[M] ), FILTER ( 'Table', 'Table'[CompCode] IN VALUES ( 'Table'[Code] ) ) ) RETURN IF ( 'Table'[ComponentGroup] = "RM: M", _edb, IF ( _leftf = " FP" || _leftf3 = "WIP", _sumif, 0 ) )How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ RongtieIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi TonyBarron ,
I have created a simple sample, please refer to my pbix file to see if it helps you.
Create a column.
Column =
VAR _edb = ( 'Table'[DomesticPrice] * 'Table'[Quantity] ) / 'Table'[BOMQty]
VAR _leftf =
LEFT ( 'Table'[ComponentGroup], 2 )
VAR _leftf3 =
LEFT ( 'Table'[ComponentGroup], 3 )
VAR _sumif =
CALCULATE (
SUM ( 'Table'[M] ),
FILTER ( 'Table', 'Table'[CompCode] IN VALUES ( 'Table'[Code] ) )
)
RETURN
IF (
'Table'[ComponentGroup] = "RM: M",
_edb,
IF ( _leftf = " FP" || _leftf3 = "WIP", _sumif, 0 )
)
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.