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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
nimp_kp
Frequent Visitor

Matrix with dynamic columns of the last 3 years

Hi

 

I'm trying to create a matrix table that shows the sales at two specific dates each year for the last 3 years.

The specific dates are february 1st and july 1st.

As of today, the table should have 7 date columns: july 1st 2016, february 1st 2017....july 1st 2019. 

I want the table to show every sales date in between the newest sales date and 3 years back. As of today that is july 1st 2016 to july 1st 2019.

When we get to february 1st 2020 the measure should dynamically change the columns so the newest sales date is february 1st 2020 and the oldest is february 1st 2017.

Something like this:

 

What the table should show today:

 20160701201702012017070120180201201807012019020120190701
sales1000100020002000100015001200

 

What the table should show when we reach february 1st 2020:

 20170201201707012018020120180701201902012019070120200201
sales1000200020001000150012002000

Thanks

0 REPLIES 0

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.