Forum Discussion
MathiasChaparro
2 years agoFrequent Visitor
Dynamic Column Headers in matrix - Report Server
Hi everyone: I would like the matrix headers to be partly static and partly dynamic. Like this below The base structure is simple, I have a fact table, a calendar table and several ...
- 2 years ago
Hello Community:
I found the solution using Power Query.
I duplicate my "Calendar" table and leave only the "Fin de Mes" field, then add conditional columns to find the previous month and previous year using the functions "Date.Add.Years and Date.AddMonths"
As a next step, unpivot columns and add an index to sort the table according to my requirement.
And as a last step I created a measure to contain the values ​​I need in each column
It works perfectly and is what the user was looking for! Thank you for reading 😊
MathiasChaparro
2 years agoFrequent Visitor
Thank you very much for the response, would you have any example of the solution you mention?
lbendlin
2 years agoSuper User
Calendar = ADDCOLUMNS(CALENDAR("2024-02-24",TODAY()),"Year",FORMAT([Date],"yyyy"),"Month",FORMAT([Date],"mmm"),"MNo",FORMAT([Date],"mm"),"One Month Ago",EDATE([Date],-1),"One Year ago",EDATE([Date],-12))