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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
N_R_000
Helper I
Helper I

Merging Tables with no shared columns

I need to 'merge' 2 tables in BI, using DAX only to create a new table, containing every row from each of the 2 tables. 

 

Table 1 is a DAX Dates table, dynamically populated with the following: 

Ref_Dates = 
VAR MinDate = YEAR(MIN(Tasks[ProcessedDate]))
VAR MaxDate = YEAR(MAX(Tasks[ProcessedDate]))

RETURN

ADDCOLUMNS(
            FILTER(
            CALENDARAUTO(), 
            YEAR([Date]) >= MinDate && 
            YEAR([Date]) <= MaxDate), 
            "Year", YEAR( [Date]), 
            "Month Year", FORMAT([Date], "mmm yyyy"),
            "Month Name", FORMAT([Date], "mmmm"),
            "Month Number", MONTH([Date] ),
            "Day Name", 
                            VAR Wd = WEEKDAY([Date], 2)
                            RETURN DATE (1900, 1, 7 + Wd + (7 * (Wd < 1))),
            "Day of Month Number", DAY([Date]),
            "IsWeekday", IF(WEEKDAY([Date], 2) IN {6,7}, 0, 1),
            "Date as Text", FORMAT([Date], "dd mmm yyyy"), 
            "Start of Month", DATE(YEAR([Date]), MONTH([Date]), 01),
            "Start of Week", [Date]-WEEKDAY([Date],2)+1
            
            )

N_R_000_0-1651244943535.png

 

Table 2 is a users table, looks like this: 

N_R_000_1-1651245067754.png

 

How can I merge the 2 tables, to end up with this: 

N_R_000_2-1651245084571.png

 

1 ACCEPTED SOLUTION
v-luwang-msft
Community Support
Community Support

Hi @N_R_000 ,

You could use crossjoin:

Table 2 = CROSSJOIN('Table',SELECTCOLUMNS(Ref_Dates,"Date",Ref_Dates[Date]))

vluwangmsft_1-1651644904612.png

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

View solution in original post

2 REPLIES 2
v-luwang-msft
Community Support
Community Support

Hi @N_R_000 ,

You could use crossjoin:

Table 2 = CROSSJOIN('Table',SELECTCOLUMNS(Ref_Dates,"Date",Ref_Dates[Date]))

vluwangmsft_1-1651644904612.png

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

HotChilli
Community Champion
Community Champion

In DAX , use the GENERATE function.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.