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
paddy_gfb
Frequent Visitor

Related function showing incorrect value

Hi,

I am trying to use a RELATED() funciton to sum values from related tables.

 

I have a known accurate table shown below;

table.PNGI am now trying to create a new column to sum the total, freight and freighttax. 

Here is the formula for the new column:

z Total, Freight, FreightTax = JimJobPart[Total] + related(jimjob[freight]) + related(Jimjob[Freighttax])

 

When I graph this column in a table I get the sum of this column.

table2.PNG

 

When I click on "JobNo" 415304 from the above table (img1) the table changes to this:

table3.PNG

This seems to be all updating and working fine except that the total is not correct. From the origional table i should be getting 25245+20+2 = 25267, but the custom column is returning 25817 for some reason. 

 

To test this, I created a new column and graphed it in a table shown below:

z Freight = RELATED(jimjob[freight])

 table4.PNG

 

I did the same with the value directly from the "JimJob[Freight]" column and got:

table5.PNG

For some reason the RELATED() function is producing the wrong value. If i click through my origional table to other job numbers, some are correct and some are incorrect by different magnitudes. 

 

There is only one instance of each JobNo in both tables.

 

Am I missing something here? I am in "mixed" mode if that makes a difference, although all of the data i am dealing with in this instance is from a directquery.

8 REPLIES 8
v-frfei-msft
Community Support
Community Support

Hi @paddy_gfb,

 

I cannot open the pbix you shared, kindly post your sample data to work around. You can export the data to csv/excel and share the file here and kindly tell me the retationship between your tables.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Hi Frank,

Thanks for the help. As i am using a live conneciton, how do i share a snapchot of the data?

affan
Solution Sage
Solution Sage

Hi @paddy_gfb

 

Can you please share the pbix file so I can help you on this

Hi Affan,

Sorry for the novice question, but how do i do this and will this also share my database data?


Thanks for the help

@paddy_gfb

 

The ideal way is to create a sample pbix with not actual data. Upload the file to either dropbox or google drive and share a link.

@paddy_gfb

The file you have sent is having a mixed mode data which cannot be opened by me. Is it possible for you to either share the file with imported date and only the tables on which you need help remove all the other tables from the file.

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.