Forum Discussion
Anonymous
4 years agoNot applicable
Dynamic column names needed in a dynamic sum equation
Hi guys, I need to pivot a column full of payslip IDs with values that is their pay amount for the fortnight. The payslip IDs are incremental so I am able to extract only the latest 6 payslips an...
- Anonymous4 years ago
Hi Anonymous
Not sure if you really need to unpivot those columns, keep them then sum up, but yes, there are ways to do in M. I created dummy data to show 2 ways in the file. You need to amend the logic accordingly for finding the latest 6 columns, and remove values not in these columns - last6 list and the list.sum
Anonymous
4 years agoNot applicable
Hi Anonymous
Not sure if you really need to unpivot those columns, keep them then sum up, but yes, there are ways to do in M. I created dummy data to show 2 ways in the file. You need to amend the logic accordingly for finding the latest 6 columns, and remove values not in these columns - last6 list and the list.sum
Anonymous
4 years agoNot applicable
Thank you, that was exactly what I wanted.