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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
unknown917
Helper III
Helper III

Summarizing data from 2 different tables with Date

I have 2 source tables, one with historical volume, the other with open or future volume.  Each table has a date column.  In my model I've created a unique date table with a range wide enough to cover both source tables.  I created a relationship to each source table from the "Date" table.

 

My next dilemna is the need to create a visual that blends both the "Historical" and "Future" volume data by year and month.  My inclination is that I need to create a new column in my "Date" table that will summarize the volume data from both the "historical" and "future" tables.

 

My expected outcome is something like:

 

 JANFEBMAR
202310012575
202412550200
20257510050

 

Any help will be greatly appreciated,

 

Thank you!

2 ACCEPTED SOLUTIONS
johnt75
Super User
Super User

Create a measure like

Combined Value = SUM( Historic[Value] ) + SUM( Future[Value] )

Put this in a matrix with columns from your date table.

View solution in original post

Anonymous
Not applicable

Hello,johnt75 ,gmsamborn and uzuntasgokberk ,thanks for your concern about this issue.

Your answers are excellent!
And I would like to share some additional solutions below.

Hi,@unknown917 .I am glad to help you.
I tried the idea you suggested for the DATE table that has all the data, and added a new calculated column that has all the data from both tables, which ensures that the data is displayed normally as one row in the matrix

vjtianmsft_0-1736230089237.png

My test data:

vjtianmsft_1-1736230105408.pngvjtianmsft_2-1736230111466.png
This is the optimized dax code
vjtianmsft_3-1736230120787.png

The model relationship:

vjtianmsft_4-1736230226291.png
This is my test code

AllDailySales = 
IF (
    SELECTCOLUMNS ( RELATEDTABLE ( historical ), "a", [DailySales] ) <> BLANK (),
    SELECTCOLUMNS ( RELATEDTABLE ( historical ), "a", [DailySales] ),
    SELECTCOLUMNS ( RELATEDTABLE ( future ), "b", 'future'[Forecast daily sales] )
)


Suggestion2

I also tested the solution proposed by johnt75, which uses a matrix to present the data, and can achieve similar results.

TestAllMeasure =
SUM ( 'historical'[DailySales] ) + SUM ( 'future'[Forecast daily sales] )

 

vjtianmsft_5-1736230340502.png

 

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hello,johnt75 ,gmsamborn and uzuntasgokberk ,thanks for your concern about this issue.

Your answers are excellent!
And I would like to share some additional solutions below.

Hi,@unknown917 .I am glad to help you.
I tried the idea you suggested for the DATE table that has all the data, and added a new calculated column that has all the data from both tables, which ensures that the data is displayed normally as one row in the matrix

vjtianmsft_0-1736230089237.png

My test data:

vjtianmsft_1-1736230105408.pngvjtianmsft_2-1736230111466.png
This is the optimized dax code
vjtianmsft_3-1736230120787.png

The model relationship:

vjtianmsft_4-1736230226291.png
This is my test code

AllDailySales = 
IF (
    SELECTCOLUMNS ( RELATEDTABLE ( historical ), "a", [DailySales] ) <> BLANK (),
    SELECTCOLUMNS ( RELATEDTABLE ( historical ), "a", [DailySales] ),
    SELECTCOLUMNS ( RELATEDTABLE ( future ), "b", 'future'[Forecast daily sales] )
)


Suggestion2

I also tested the solution proposed by johnt75, which uses a matrix to present the data, and can achieve similar results.

TestAllMeasure =
SUM ( 'historical'[DailySales] ) + SUM ( 'future'[Forecast daily sales] )

 

vjtianmsft_5-1736230340502.png

 

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian

johnt75
Super User
Super User

Create a measure like

Combined Value = SUM( Historic[Value] ) + SUM( Future[Value] )

Put this in a matrix with columns from your date table.

uzuntasgokberk
Super User
Super User

Hello @unknown917 ,

You have Dimdate table and made relationship to other tables with Date column. Perfect. So what ı don't understand is why don't you use year and month column from Dimdate and the values from other tables? Based on your case it will be solved.

 

Kind Regards,
Gökberk Uzuntaş

📌 If this post helps, then please consider Accepting it as a solution and giving Kudos — it helps other members find answers faster!

🔗 Stay Connected:
📘 Medium |
📺 YouTube |
💼 LinkedIn |
📷 Instagram |
🐦 X |
👽 Reddit |
🌐 Website |
🎵 TikTok |

doing that resulted in a 2nd column for the 2025 (future) entry.  For instance, 2023 & 2024 existed in one column for January, 2025 existed in a column adjacent.  See below:

 

 JANJAN
2023100 
2024125 
2025 75

Hi @unknown917 

 

I didn't see your post when I added mine.

Here is an example that has JAN 2025 as Historical instead of Future.

 

Summarizing data from 2 different tables with Date 2.pbix

 



Proud to be a Super User!

daxformatter.com makes life EASIER!

Hi @unknown917 

 

Take a look at this.

Summarizing data from 2 different tables with Date.pbix

 



Proud to be a Super User!

daxformatter.com makes life EASIER!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.