Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Good morning, I have a problem of calculations that no more than I have seen in the forum and on youtube I am not able to solve applying functions and operators, etc.
To also say that I do not think the error is due to Power Bi, I think it is rather how they give us that extracted data but I want to make sure that if someone has passed this I can verify it.
We have the following example of a table that has a subtraction to get a profit of x day.
Price Sale Price Purchase Profit Item Delivery Note
25 15 10 Chain 00123
20 15 5 Screw 00234
85 79 6 Pin 00235
First and when adding the benefit that should give 21, gives us 41, I have a column called Total Albaranes, it is a counting column simply (TotAlbaranes = 1) that in this case should give 3, again if the column of Total Albaranes is added gives 6. I do a Calculate so that it will give me the number of lines and it shows me the following result:
ColumnCalculate Price Sale Price Purchase Profit Item Delivery Note
2 25 15 10 Chain 00123
3 20 15 5 Screw 00234
1 85 79 6 Pin 00235
All columns are with the option do not summarize so as not to show erroneous data, if I put the option to add I get erroneous data in all the data.
I come to the conclusion that the value of the first row is 2, the second is 3 and the last is 1, now why does Power Bi do this? I do not know if it is the subject of the program or the relationships of the tables, I imagine that it will be the latter because I do not explain it, if I filter for a day in which all the articles have a 1 in the calculate column and I have no problem, all the results are correct but as soon as there is a row that is no longer 1 and I distort the result of that row and therefore the totals of course since any measure or column you do to show me 1 if at the end I add that column or measure the result is always the same in this case 6. It's as if those rows have that value and there's no way to modify or calculate it (I've tried to split the same column together to force the 1 and there's no way, when I get it the result is 6 always.
Also say that the tables are extracted from an Odoo sh database and all the relationships between them are made of many to many because it does not support another power bi relationship, the other options are disabled and it is not possible to use another form of relationship I imagine because of how the relationships have been made to get the data out.
Has this happened to anyone else? Any clarification or idea I appreciate in advance.
Thank you so much
Best regards.
Good morning
Thank you for answering, I imagined that it was for the extraction of the database that we have done, I will see how the relationship columns are and if I can do a data clean of those columns.
Best regards.
"all the relationships between them are made of many to many because it does not support another power bi relationship"
Most likely you have "dirty" data in your key columns (the ones that link the tables). Clean up your data (no blanks, no duplicates in the dimension column), and then change the relationships to what actually makes sense.