cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cgallegos
Regular Visitor

Dynamic Column Headings - Dates Over Time

Hi - I am wanting to have column headings that change as my dashboard is refreshed or updated.

 

For example,  I'd like the below "current week" heading to say "Jan 14-20" as the values in that column are calculated for that date range. Is there a way to do this?

 

Thank you,

 

cgallegos_0-1643397732798.png

 

1 ACCEPTED SOLUTION

I initially implemented this as a DAX calculated column but then realized this would not work as it doesn't sort the result correctly. I reverted back to the standard method of supplying an external calendar table instead.  See attached for both options.

View solution in original post

9 REPLIES 9
lbendlin
Super User
Super User

If by "dynamic"  you mean "recalculated during every import mode dataset refresh"  then yes.  Otherwise please provide more details, some sample data would be nice too.

Essentially, I'd like to see week over week # of Hired Employees. The weeks runFriday-Thursday, though. 
For example, if my raw data looks like something like this:

 

HiresRegionEffective Date of HireDashboard Refresh Date
1Consumer Ret1/14/20221/31/2022
1Consumer Ret1/14/20221/31/2022
1Consumer Ret1/14/20221/31/2022
1Consumer Ret1/14/20221/31/2022
1Consumer Ret1/14/20221/31/2022
1Consumer Ret1/20/20221/31/2022
1Consumer Ret1/21/20221/31/2022
1Consumer Ret1/21/20221/31/2022
1Consumer Ret1/27/20221/31/2022

 

And I'd like it summarized like this

 

 Hires
RegionJan 14-20Jan 21-27YTD
Consumer Ret639

 

 

What would be the expected column header for the next week?  "Jan 28-Feb 3" ?  You may be running out of screen real estate fast.

Hi,

Yes, next column would be Jan 28-Feb 3. I am only planning to show the last 4 weeks.

PLease add some more sample data so it covers that whole period.

Let me know if you need any additional data.

I initially implemented this as a DAX calculated column but then realized this would not work as it doesn't sort the result correctly. I reverted back to the standard method of supplying an external calendar table instead.  See attached for both options.

Thank you!!

Raw Data: 

 

HiresRegionEffective Date of Hire
1Consumer Ret1/14/2022
1Consumer Ret1/14/2022
1Consumer Ret1/14/2022
1Consumer Ret1/14/2022
1Consumer Ret1/14/2022
1Consumer Ret1/20/2022
1Consumer Ret1/21/2022
1Consumer Ret1/21/2022
1Consumer Ret1/27/2022
1Consumer Ret1/28/2022
1Consumer Ret1/28/2022
1Consumer Ret2/3/2022
1Consumer Ret2/3/2022
1Consumer Ret2/3/2022
1Consumer Ret2/4/2022
1Consumer Ret2/4/2022
1Consumer Ret2/10/2022
1Consumer Ret2/10/2022

 

Week Over Week - What I'd Like to Get to

RegionJan 14-20Jan 21-27Jan 28-Feb 3Feb 4 - Feb 10YTD 
Consumer Ret635418

 

Helpful resources

Announcements
Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May 23 2022 episode 5 with aka link.jpg

The Power BI Community Show

Welcome to the Power BI Community Show! Jeroen ter Heerdt will talk about the importance of Data Modeling.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Power BI Release May 2022 768x460.png

Check it out!

Click here to read more about the May 2022 updates!