Hi,
anyway can help in implementing the case sensitivity in List.PositionOf ?
for the attached lkianchoo suppose to return with Dept value, however the master table is Lkianchoo
trying to apply case sensitivity using Compare.OrdinalIgnorecase, wrap the two parameters with Text.Upper() etc, but encounter cannot convert a value of type Function to type Type, or cannot convert a value of type List to type text etc
any workaround or solution will be appreciated
Thank you Sir/Madam
Change the script to this:
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Name", type text}, {"Age", Int64.Type}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Index", each List.PositionOf(Master[Userid],[User Name],1,Comparer.OrdinalIgnoreCase
)),
#"Added Custom1" = Table.AddColumn(#"Added Custom", "Dept", each try Master[Dept]{[Index]} otherwise "Not found")
in
#"Added Custom1"
Hi Riny
Wow, so is possible to apply Comparer.OrdinalIgnoreCase to List, and what does the 1 stand for ?
thank you so much Sir
According to the M function reference, the place where I entered 1 is for an "optional occurrence parameter". Even though it says "optional" one would expect that you can leave it out and just type ......[User Name],,Comparer.OrdinalIgnoreCase.....
Do that you get error. Enter 0 or 1 will work just fine. Anything greater creates lists of occurrences.
Why you must fill in something when it's supposed to be optional , I don't know.