Forum Discussion
Related function not returning any values.
- 2 years ago
if you are creating a column in the table on the 1 side of the relationship, and getting data from the table on the many side of the relationship, you need to use relatedtable.
if you are creating a column in the table on the many side of the relationship, and getting data from the table on the one side of the relationship, you need to use related.( keep in mind, that relatedtable returns a table not a scalar value, so in order to get data from using relatedtable,
you need to then using an iterator over relatedtable . )
hope this helps .
If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution ✅
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠
if you are creating a column in the table on the 1 side of the relationship, and getting data from the table on the many side of the relationship, you need to use relatedtable.
if you are creating a column in the table on the many side of the relationship, and getting data from the table on the one side of the relationship, you need to use related.
( keep in mind, that relatedtable returns a table not a scalar value, so in order to get data from using relatedtable,
you need to then using an iterator over relatedtable . )
hope this helps .
If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution ✅
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠
- Victor_AguirreV2 years agoRegular Visitor
This worked! I used the relatedtable as a variable as follows:
Is RF =VAR RTable = RELATEDTABLE('All RFs')VAR FilteredTable = FILTER(RTable, 'All RFs'[AcuityTecID]= 'All Trx'[Trans ID])RETURNif(ISBLANK(IF (COUNTROWS(FilteredTable) > 0,MAXX(FilteredTable, 'All RFs'[AcuityTecID]),BLANK())), "No","Yes")If I understand what this is doing correctly (I used gpt to help build it), the filtered table is returning a table, with the ones that match the ID in the all trx table.Then the MAXX formula, is going line by line applying the logic, and then returning the max value?I still don't have the hang of how iterative formulas work.- Daniel291952 years agoCommunity Champion