Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Calculated Table Column Headers

Hi, I have a calculated table like this:

 

ET1995_0-1621345053643.png

Now, the 2nd Last Week and Last Week names come from my code, where I specify these names so they are hard coded. I want them to instead represent the date they belong to. So, the column name for Latest Week should be 7-Apr-21 and for 2nd Last Week shoul be 31-Mar-21. For any other dates, a column will be blank so it is only going to show values for the week date it represents

 

I want it such that when I visualize the data the dates dynamically change as the weeks go by

 

Any ideas?

3 REPLIES 3
v-angzheng-msft
Community Support
Community Support

Hi, @Anonymous 

 

What you mean is that you want to be able to dynamically modify the column names according to the date?

 

Unfortunately this may be difficult to achieve through DAX, but this is not completely impossible to achieve,

it can be done by using M code in the power query, but unfortunately this forum is not a forum dedicated to discussing powerquery, I suggest you look for answers in the power query forum or create a New Message in the forum for help. This is all I can do, I hope this is useful to you

 

Here is the link to the power query forum:

Power Query forum 

 

 

Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , Not very clear to me. refer to my blog how can you create WOW measures using a date table

 

Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123
https://www.youtube.com/watch?v=pnAesWxYgJ8

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak I actually just want the week dates to show in the column headers instead of having the week dates in a column

 

WOW measures are great but won't work for me as my data has some gaps and does not have consecutive weeks, so some dates have a gap of 14 days

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors