Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.

More efficient expression?

I have the following expression where I need to get the value of the field "Account: Gold Class Renewal Date" from the GC Requirements table that has a ref into the table this virtual column resides in.  Here's the expression:

text(any(select(GC Requirements[Account: Gold Class Renewal Date],[_THISROW].[Org ID]=[Org Id])))

This is impacting performance.  Is there a better way to do this?  All related rows should have the same renewal date, which is why I'm using "Any", I just need to capture it once.

 

Thanks in advance!

Solved Solved
1 3 92
1 ACCEPTED SOLUTION

I believe you should be able to use a reference or deference function depending on which table is the parent.

Reference to child record to parent:

Text(ANY([Org Id].[Account: Gold Class Renewal Date]))

Or

Dereference from parent to child records:

Text(ANY([Related GC Requirements][Account: Gold Class Renewal Date]))

View solution in original post

3 REPLIES 3

It looks good. The TEXT expression is really necessary? If yes, it looks fine

 

I believe you should be able to use a reference or deference function depending on which table is the parent.

Reference to child record to parent:

Text(ANY([Org Id].[Account: Gold Class Renewal Date]))

Or

Dereference from parent to child records:

Text(ANY([Related GC Requirements][Account: Gold Class Renewal Date]))

The above suggestion is cleaner code, so I'm using it.  The performance analyzer surprisingly says it made almost no difference in compute time, however.  Thanks for the help!

Top Labels in this Space