Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hello all,
I am having again an issue, probably pretty simple.
I need the sum of 2 different columns from 2 different tables.
Tried different options, but i won't get the wright solution in my visual.
-I have 2 columns from 2 different tables.
Table 1 [Column Distance]
Table 2 [Column Flat Distance]
-I Need a new Column named [Total Distance]
So the Sum between Distance + Flat Distance.
Now i am, having the formula:
Table 1 | Table 2 | Expected | Result now | |||
Distance | DIstance Flat | |||||
100 | 25 | 125 | 951669 | |||
150 | 5 | 155 | 951669 | |||
100 | 75 | 175 | 951669 | |||
200 | 100 | 300 | 951669 | |||
185 | 20 | 205 | 951669 | |||
200 | 50 | 250 | 951669 | |||
250 | 75 | 325 | 951669 |
Do you guys have an idea?
Thanks,
Good mornig,
Does somebody else, has any idea?
I'am stuck.
Gr,
Hi,
I am not sure how your datamodel looks like, but if you are looking for creating a new table, please check the below picture and the attached pbix file.
New Table =
SUMMARIZE (
ADDCOLUMNS (
GENERATE ( Table1, FILTER ( Table2, Table2[ID] = Table1[ID] ) ),
"@Total Distance", Table1[Distance] + Table2[Distance Flat]
),
Table1[Distance],
Table2[Distance Flat],
[@Total Distance]
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hello Jihwan,
Thank you for your response.
Unforunatly i becom an error when i will use your text:
I added a newe column and putted your text in here.
Is this the wright way?
Gr
Hi,
Thank you for your message.
I am not sure how to check it without seeing your datamodel, but I see that you put that as a calculated column. My DAX formula is for creating a table, not a column.
Please share your sample pbix file's link, and then I can try to look into it to come up with a solution.
Thanks.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hello,
Also with a new Table, i become this error.
Attach you will find my dummy "Distance"PBIX file, with the same settings and relationship.
Sorry, i will find out now how to share this link.
In this file your code is working, but the outcome in my visual is still the sum of al values together.
When i change this to "don't summarize" i become below error.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
92 | |
82 | |
71 | |
49 |
User | Count |
---|---|
143 | |
121 | |
112 | |
58 | |
57 |