Forum Discussion
Namoh
6 years agoPost Partisan
Calculated column using data from multiple rows and columns
Hi, I want to add a (calculated) column based on values in different rows/columns. Date Unit Hrs planned down Hrs unplanned down no breakdowns hours in month Calculated column 1/1/...
- Anonymous6 years ago
HI Namoh,
You can use following calculate column formula to achieve your requirement:
Column = CALCULATE ( DIVIDE ( SUM ( 'Table'[hours in month] ) - SUM ( 'Table'[Hrs planned down] ) - SUM ( 'Table'[Hrs unplanned down] ), SUM ( 'Table'[no breakdowns] ), -1 ), FILTER ( ALL ( 'Table' ), [Unit] = EARLIER ( 'Table'[Unit] ) && YEAR ( [Date] ) = YEAR ( EARLIER ( 'Table'[Date] ) ) ) )Regards,
Xiaoxin Sheng
Namoh
6 years agoPost Partisan
Ok, so I got a bit further.
What I want is not possible in PQE, but only in DAX.
I always made formulas in PQE and never in DAX.
Anyone who know show this can be done in DAX?