Forum

How to handle List....
 
Notifications
Clear all

How to handle List.Positionof when return -1

4 Posts
2 Users
0 Reactions
637 Views
(@eugh)
Posts: 2
New Member
Topic starter
 

Hi,

The custom formula List.PositionOf( Module [Charge Type],[Charge Type] ) is return -1 in the column name Index for item not found in the list. How can I get the List.Positionof to return for item not in list to return NA.?

Thank YouPQ_Index_formula-.png

 
Posted : 12/04/2024 8:51 pm
Philip Treacy
(@philipt)
Posts: 1630
Member Admin
 

=if List.PositionOf( Module [Charge Type],[Charge Type] ) = -1 then "N/A" else List.PositionOf( Module [Charge Type],[Charge Type] )

 
Posted : 12/04/2024 9:38 pm
(@eugh)
Posts: 2
New Member
Topic starter
 

Philip,

Thank you so much. I never thought of wraping the formula with the IF statement. I have just learn somenthing new.

 
Posted : 12/04/2024 10:58 pm
Philip Treacy
(@philipt)
Posts: 1630
Member Admin
 

No worries.

 
Posted : 15/04/2024 10:01 am
Share: