Forum Discussion
Anonymous
7 years agoNot applicable
Fill a column based on last month date
Hello! I need to create a calulated column "NEW COLUM", placing the last month values acording to the "tipe" column, and olny the last month f.e I had 2700000 kg of CPRS in January, i need the...
- 7 years ago
Try like this:
= CALCULATE(
SUM( 'Table'[kGS] ),
ALLEXCEPT( 'Table', 'Table'[Type] ),
'Table'[Month] = EARLIER( 'Table'[Month] ) - 1
)
LivioLanzo
Solution Sage
7 years ago
you're probably using it in a measure which has no row context instead of a calculated column as the OP requested:
"
Hello!
I need to create a calulated column "NEW COLUM", placing the last month values acording to the "tipe" column,
and olny the last month f.e I had 2700000 kg of CPRS in January, i need the same value for fabruary"
edhans
Community Champion
7 years agoAhhh... thanks. I never create calculated columns unless I need it in a measure, and even then, I tend to push it back to Power Query, so my bias there missed that part of the question. :-)