Forum Discussion
How to use SUMMARIZE inside a calculated column?
- 2 years ago
aji549 Not sure I am following this. Calculated columns cannot be affected by filters so you would need a measure in that case. As a measure, you could potentially do something like this:
Measure = VAR __Emp = MAX('Table'[EMP_ID]) VAR __Result = SUMX( FILTER( ALLSELECTED( 'Table' ), [EMP_ID} = __Emp ), [SALARY] ) RETURN __Result - Anonymous2 years ago
Hi, aji549
You can refer to Greg_Deckler reply. If it doesn't meet your needs, you can refer to the following DAX.Total SALARY = CALCULATE( SUM('Table'[SALARY]), FILTER( 'Table', 'Table'[EMP_ID] = EARLIER('Table'[EMP_ID]) ) )Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi, aji549
You can refer to Greg_Deckler reply. If it doesn't meet your needs, you can refer to the following DAX.
Total SALARY = CALCULATE(
SUM('Table'[SALARY]),
FILTER(
'Table',
'Table'[EMP_ID] = EARLIER('Table'[EMP_ID])
)
)
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum