- 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

Issue with sum and averages between tables
Hi guys.
Suppose to have those tables:
ProductionTable | |||
Production Date | ProdOrder | Line | kg |
23/06/2024 | 123 | 1 | 100 |
23/06/2024 | 123 | 1 | 100 |
23/06/2024 | 123 | 1 | 100 |
23/06/2024 | 123 | 1 | 100 |
23/06/2024 | 456 | 1 | 150 |
24/06/2024 | 456 | 1 | 150 |
24/06/2024 | 456 | 1 | 150 |
24/06/2024 | 456 | 1 | 150 |
22/06/2024 | 789 | 2 | 200 |
22/06/2024 | 789 | 2 | 200 |
22/06/2024 | 789 | 2 | 200 |
OrderTable | ||
ProdOrder | kg | Date |
123 | 400 | 22/06/2024 |
456 | 600 | 23/06/2024 |
789 | 600 | 22/06/2024 |
DateTable | |
DateTable | Month |
01/06/2024 | 6 |
02/06/2024 | 6 |
03/06/2024 | 6 |
04/06/2024 | 6 |
05/06/2024 | 6 |
06/06/2024 | 6 |
07/06/2024 | 6 |
08/06/2024 | 6 |
09/06/2024 | 6 |
10/06/2024 | 6 |
11/06/2024 | 6 |
12/06/2024 | 6 |
13/06/2024 | 6 |
14/06/2024 | 6 |
15/06/2024 | 6 |
16/06/2024 | 6 |
17/06/2024 | 6 |
18/06/2024 | 6 |
19/06/2024 | 6 |
20/06/2024 | 6 |
21/06/2024 | 6 |
22/06/2024 | 6 |
23/06/2024 | 6 |
24/06/2024 | 6 |
25/06/2024 | 6 |
26/06/2024 | 6 |
27/06/2024 | 6 |
The tables are connected following these relationships:
-ProductionTable[Production Date]-->DateTable[Date]
-ProductionTable[ProdOrder]-->OrderTable[ProdOrder]
-OrderTable[date]-->DateTable[Date] (inactive)
The goal is to build a measure that show me the average of the order's quantity taken by OrderTable, with the possibility to filter in a filter view the Line and the Period. My difficulty is that I don't know how to link the column ProductionTable[Line] with OrderTable[ProdOrder].
The questions could be:
"what is the average dimensions of orders?"
The answer is: in 22/06 =500kg, in 23/06 = 600kg.
"What is the average dimensions of Orders produced by Line 1?
The answer is 500kg.
As you can see from the tables, the ProductionDate of an order could be different from the Date in the OrderTable. It doesn't matter: the Date in OrderTable is the one i'm interested to check.
I need to do it in DAX, so please don't suggest something like table merge.
Some hints?
Thankyou!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Expertise = List.Accumulate( {Days as from Today}, {Skills and Knowledge}, (Current, Everyday) => Current & Day.LeanAndPractise(Everyday) ) |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Thank you all for replies.
Thanks to your work I've discovered that take the information from the OrderTable is not a good choice.
I'll ask your hel again in a different topic.
- 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

Hi @andreazambon - Please find the below steps to get the expected output for 22/6 and 23/6- average dimensions of Orders produced by Line 1
Model has been defined as per description.
I have designed the same model as per the above description:
create measures to calculate the average order dimensions
getting the same as expected. please check.
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |

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 | |
---|---|---|---|
07-17-2024 02:25 AM | |||
04-30-2024 06:41 AM | |||
05-06-2024 02:42 AM | |||
08-24-2024 04:38 AM | |||
08-23-2024 08:39 AM |
User | Count |
---|---|
83 | |
79 | |
53 | |
39 | |
37 |
User | Count |
---|---|
104 | |
85 | |
47 | |
43 | |
42 |