Forum Discussion
lipesouza12
4 years agoFrequent Visitor
Use variables as column names in List Selects
Hi Community, Today I'm stuck on a simple list selection. I need to load the KPI from another table according to the group the salesperson belongs to. One possibility would be an IF statement but th...
- 4 years ago
Hi lipesouza12 ,
Please try the following code.
= let a = [GROUP] in Record.Field(GOALS{List.PositionOf(GOALS[KPI], "AMOUNT")}, a)If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-kkf-msft
4 years agoCommunity Support
Hi lipesouza12 ,
Please try the following code.
=
let
a = [GROUP]
in
Record.Field(GOALS{List.PositionOf(GOALS[KPI], "AMOUNT")}, a)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
lipesouza12
4 years agoFrequent Visitor
Worked perfectly!