Forum Discussion
If then statement, invalid identifier
Hi coreych,
This is a bit strange that the Index is text rather than number, but I guess this is Ok if PQ does not throw any error.
Do you want to use this code and check what it returns to Player IDs.IDFANGRAPHS and may be figre out how to set the condition to actually make the replacement (x should be the current Player IDs.IDFANGRAPHS value, y should be Index and z should be null)?
#"Replaced Value" = Table.ReplaceValue(#"Removed Columns", each [Index], null, (x,y,z)=> {x, y, z}, {"Player IDs.IDFANGRAPHS"})
If it returns all variables as expected, do you wan tto try to make the Index to be of type number rather than text and change the filter accrodingly?
Cheers,
John
I'm also wondering how you concluded that the index is text rather than number. The index is not text, it IS a number.
- jbwtp3 years agoMemorable Member
Hi coreych,
It is in "" in your code, numbers go without it.
This is the text type value: "26"
This is the number type value: 26
Cheers,
John
- coreych3 years agoRegular Visitor
Ok, that makes some sense, but in no version of the query that returns an "invalid identifier" error does getting rid of the "" on 296 get rid of the "invalid identifier" error. In some cases taking the quotes off of "296" just moves the invalid identifier to the 16942, but that one IS text because many fangraphs IDs begin with "sa".