Forum Discussion
Anonymous
4 years agoNot applicable
calculate current week data using current week and previous week info in DAX
Hi, I hope everyone's well. I am trying to create a measure that uses previous week and current week data. The table looks like the following- week_end profit loss reference_for_1_may ne...
- 4 years ago
Hi Anonymous
Here is the sample file with the solution https://www.dropbox.com/t/6o38jT13uTKnx2FhNew Column
net_product_margin_calculated = VAR ReferenceValue = 342335 VAR FirstDateEver = MIN ( 'P&L'[week_end] ) RETURN SUMX ( FILTER ( 'P&L', 'P&L'[week_end] <= EARLIER ( 'P&L'[week_end] ) && 'P&L'[week_end] > FirstDateEver ), 'P&L'[profit] - 'P&L'[loss] ) + ReferenceValue