Iโm trying to get a ref value from another table for my report template.
[Data Structure]
Slice (used to build the report - Iโm slicing only the values that we need: weekly classes given)
Trainer (Table with the info of our trainers)
[Expression]
My first expressions get all the records from the slice:
**<<Start:SELECT(Recent Sessions[sessionID], TRUE)>>**
The second expression tries to get the list of trainer records that match the current trainer ID
**<<Start:SELECT([Trainer][trainerID], ([trainerID] = [_THISROW].[trainerID]), TRUE)>>**
However Iโm getting the following error:
Expression โSELECT([Trainer][trainerID], ([trainerID] = [_THISROW].[trainerID]), TRUE)โ is invalid due to: Unable to find column โTrainerโ, did you mean โtrainerIDโ?. Error: Report โLast Week Session Reportโ action โEmail Managersโ Body template. Start expression โSELECT([Trainer][trainerID], ([trainerID] = [_THISROW].[trainerID]), TRUE)โ should generate a List of Ref values.
I followed this topic:
However OP didnโt post what worked for her.
Any idea what the expression might be missing?
Thanks
Update: Report config view
Is Trainer table child table of Sessions table?
If so, could you please update what is the reverse reference column name in the Sessions table related to Trainer table?
Hi Suvrutt,
Sessions takes trainerID as a foreign key.
In both tables the column name is the same, trainerID
However after going around I found 2 errors in my expression:
[Old Expression]
<<Start:SELECT([Trainer][trainerID], ([trainerID] = [_THISROW].[trainerID]), TRUE)>>
Problems:
Source:
[New Expression]
<<Start:SELECT(Trainer[trainerID], ([trainerID] = [_THISROW-1].[trainerID]), TRUE)>><<[trainerName]>><<End>>
This worked for me and learned something new today.
Hi @Luis_DfG,
Excellent. Glad you figured it out and thank you for posting back your solution as well. I am sure your explanation will help anyone who refers it in future.
Tried this expression and I got an error.
โSELECT(P3DemandRelease[P3 Sub Demand ID],([Initiator] = [_THISROW-1].[Initiator]), TRUE)โ is invalid due to: Unable to find column โ_THISROW-1โ.
any suggestion please
User | Count |
---|---|
43 | |
26 | |
24 | |
14 | |
12 |