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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
StidifordN
Helper III
Helper III

Merging of two tables, one being calculated

I have two tables of data, one being a list of individual Client&Suppliers, the other being a calculated rolling 12 month Date table.


ClientSupplier_Capture.JPGDateTable_Capture.JPG

 

 

Question - How would I combine these two so that each individual Client&Supplier is replicated by the number of months in the Date table (so 12 times)?

 

 

FYI - the rolling 12 month table code I used is per below.

DateTable = var FullCalendar = ADDCOLUMNS(CALENDAR(DATE(YEAR(TODAY()),MONTH(TODAY())-11,DAY(TODAY())),TODAY()),"Month Number",MONTH([Date]),"Year",YEAR([Date]),"Year-Month",LEFT(FORMAT([Date],"yyyyMM"),6),"Year-MonthName",YEAR([Date]) & " " & Format([Date],"MMM"))
return
SUMMARIZE(FullCalendar,[Month Number],[Year],[Year-Month],[Year-MonthName])

 

1 ACCEPTED SOLUTION

@StidifordN on modelling tab, click new table and enter following expression, change table and column name as per your data model.

 

New Table = 
CROSSJOIN( VALUES( Table4[UN_ClientSupp] ), VALUES( 'Date'[YEAR-MONTH] ) ) 


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

3 REPLIES 3
parry2k
Super User
Super User

@StidifordN can you share what you would like your combined table to look like?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Example1.JPG

 

This being the first 3 lines of the ClientSupp data.

@StidifordN on modelling tab, click new table and enter following expression, change table and column name as per your data model.

 

New Table = 
CROSSJOIN( VALUES( Table4[UN_ClientSupp] ), VALUES( 'Date'[YEAR-MONTH] ) ) 


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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