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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
ammartino44
Helper III
Helper III

Help with relatedtable function

Hello. I'm tryiing to find 

 

=SUMX(Filter(RELATEDTABLE('Work Orders1'),'Work Orders1'[WO Type]="Cashout"),'Work Orders1'[WO Type]="Cashout")

1 ACCEPTED SOLUTION
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi, @ammartino44

 

From your formula, the data type of column 'Work Orders1'[WO Type] is text, while SUMX function evaluates to numbers or dates and cannot work with values of type String. Beside, the correct syntax of SUMX is: 

SUMX(<table>,<expression>)

 

In your scenario, the formula might be like :

=SUMX(FILTER(RELATEDTABLE('Work Orders1'),'Work Orders1'[WO Type]="Cashout"),ColumnName)

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi, @ammartino44

 

From your formula, the data type of column 'Work Orders1'[WO Type] is text, while SUMX function evaluates to numbers or dates and cannot work with values of type String. Beside, the correct syntax of SUMX is: 

SUMX(<table>,<expression>)

 

In your scenario, the formula might be like :

=SUMX(FILTER(RELATEDTABLE('Work Orders1'),'Work Orders1'[WO Type]="Cashout"),ColumnName)

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Gonna need more info on this one but... your formula does "look weird".   The general form of SUMX is:

  =SUMX(Table1, Expression)

 

It walks each row of the Table1, and evaluate the Expression... then adds the results together.

 

Your expression is :   'Work Orders1'[WO Type]="Cashout"  

 

That seems like a weird expression!

GilbertQ
Super User
Super User

Hi there

 

I know this might be a simple question, but have you created the relationship between your tables?

 

Also when using the related table, from memory you can only reference the RelatedTable on the many side of the relationship (NOTE: This is off the top of my head, it might be the other way around!)





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

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.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.