Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.