Forum Discussion
Klaudiusz
2 years agoRegular Visitor
Dynamic Header Names in a Table visual
Hi, I was wondering if in my scenario this is at all possible to accomplish. What I would like to do is to create dynamic header names for my table visual that will change depending on the w...
Gayatri_D05
2 years agoResolver II
Hi Klaudiusz ,
From what I understood you need the columns to be dynamic right?
I just created the following measure and added it into the matrix column part:
week = "Week" &" "&WEEKNUM(Dimdate[Date])
and hence based on my date selection and data available the column changes, attaching screenshot for reference.
and hence based on my date selection and data available the column changes, attaching screenshot for reference.
Is this what you were looking for ?
I didnt get the previous week part. if that needs to taken in consideration could you please elaborate the requirement for me ?
I hope I was able to resolve your issue. If so please tag this as the answer to help others as well. 😊
Klaudiusz
2 years agoRegular Visitor
Hi Gayatri_D05 Let me elaborate on the topic.
I'm only interested in displaying 5 weeks prior to the present time in one table visual hence why I have got the "Previous weeks" column which is made out of the following formula:
Previous Weeks = SWITCH('Date'[Week Offset],
0, 'Date'[Week],
-1, 'Date'[Week],
-2, 'Date'[Week],
-3, 'Date'[Week],
-4, 'Date'[Week])
What I do next is build 5 different measures in the filter context of this column. One for each rolling week. Now, my goal is to utilise the columns "Previous Weeks" outputs as headers for my visuals/names for my measures.
Hope that makes more sense now 🙂
Please, do let me know if anymore information is required.
Thanks