- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Multiply two tables
The title of my question isn't clear but I didn't know what to call it.
I have a table of project, with 2 columns: ID and Title.
I have another table of reporting periods (months) from 2021 to today.
I want to create a table with a row for each project for each period.
So with 165 projects and 38 perios I expect 6270 rows.
Can you suggest the M Code to achieve this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Add a custom column with a List of the Reporting Periods
- Expand that column to new rows.
Code might be something like:
#"Added Custom" = Table.AddColumn(#"Previous Step", "Reporting Period", each #"Reporting Periods", type {text}),
#"Expanded Reporting Period" = Table.ExpandListColumn(#"Added Custom", "Reporting Period")
If your List of Reporting periods is in a table named Reporting Periods, you might need to change the reference to a table column type reference, eg #"Reporting Periods"[Column Name]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hello @KervBruce,
you only need to add two lines of code:
let
Source = YourProjectTable,
ColumnMonth = Table.AddColumn(Source, "Month", each YourDatesTable),
OpenColumnMonth = Table.ExpandTableColumn(ColumnMonth, "Month", {"Month"}, {"Month"})
in
OpenColumnMonth
Best regards from Germany
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Add a custom column with a List of the Reporting Periods
- Expand that column to new rows.
Code might be something like:
#"Added Custom" = Table.AddColumn(#"Previous Step", "Reporting Period", each #"Reporting Periods", type {text}),
#"Expanded Reporting Period" = Table.ExpandListColumn(#"Added Custom", "Reporting Period")
If your List of Reporting periods is in a table named Reporting Periods, you might need to change the reference to a table column type reference, eg #"Reporting Periods"[Column Name]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hello @KervBruce,
you only need to add two lines of code:
let
Source = YourProjectTable,
ColumnMonth = Table.AddColumn(Source, "Month", each YourDatesTable),
OpenColumnMonth = Table.ExpandTableColumn(ColumnMonth, "Month", {"Month"}, {"Month"})
in
OpenColumnMonth
Best regards from Germany
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
10-22-2024 10:46 AM | |||
08-17-2024 03:06 AM | |||
08-15-2024 04:39 AM | |||
07-22-2024 04:34 PM | |||
08-14-2023 08:11 AM |
User | Count |
---|---|
30 | |
26 | |
24 | |
13 | |
10 |
User | Count |
---|---|
24 | |
23 | |
18 | |
12 | |
9 |