Forum Discussion
Summarizing data from 2 different tables with Date
- 1 year ago
Create a measure like
Combined Value = SUM( Historic[Value] ) + SUM( Future[Value] )Put this in a matrix with columns from your date table.
- Anonymous1 year ago
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 matrixMy test data:
This is the optimized dax codeThe model relationship:
This is my test codeAllDailySales = IF ( SELECTCOLUMNS ( RELATEDTABLE ( historical ), "a", [DailySales] ) <> BLANK (), SELECTCOLUMNS ( RELATEDTABLE ( historical ), "a", [DailySales] ), SELECTCOLUMNS ( RELATEDTABLE ( future ), "b", 'future'[Forecast daily sales] ) )
Suggestion2I 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] )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
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:
| JAN | JAN | |
| 2023 | 100 | |
| 2024 | 125 | |
| 2025 | 75 |
- gmsamborn1 year ago
Super User
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
- gmsamborn1 year ago
Super User