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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
LagSpencer
Microsoft Employee
Microsoft Employee

How to Create a dynamic Matrix visual using a date column to Assign Months

I have the following data below 

 

LagSpencer_0-1657924426346.png

I looking to create a matrix and dynamiclly assign forecast Month based on Support ready date

so for example Work Item 1230 forecast month 1 = july, forecast month 2 = Aug and so on

For Work Item 1456 Forcast month would =Sep

 

example on matrix trying to create

 

LagSpencer_1-1657925006485.png

 

1 ACCEPTED SOLUTION
vapid128
Solution Specialist
Solution Specialist

image.png

image.pngimage.pngimage.png

 

NewMonth = 
var index = YEAR([Ready Date])*12+MONTH([Ready Date])+[ForcastMonth]-2
return int(index/12)&"-"&FORMAT(MOD(index,12)+1,"00")

View solution in original post

1 REPLY 1
vapid128
Solution Specialist
Solution Specialist

image.png

image.pngimage.pngimage.png

 

NewMonth = 
var index = YEAR([Ready Date])*12+MONTH([Ready Date])+[ForcastMonth]-2
return int(index/12)&"-"&FORMAT(MOD(index,12)+1,"00")

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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