Forum Discussion
Need help with function to get column types
Hi ImkeF !
glad that you saw my post. Thank you for so quick answer.
I read a lot about expression.evaluate from your links and learned a lot.
The issue is that the function provided returning for me "number" instead of type Int64.Type as result.
Why? I can not determine Int64.Type as result ?
Best,
Jacek
Hi jaryszek ,
sorry, was on a different track here.
Although I had mentioned in my blog, that only primitive types can be returned, this was not reflected in my function. So all complex types would actually be returned as their correponding primitive type. Sorry about that.
Have adjusted the function accordingly.
- jaryszek4 years agoSuper User
Hi ImkeF .
Thank you very much.
What did you change? I saw that you jsut removed Int.64 type.But still it doesnt solve the issue. Still i need to get exactly Int.64 Type.
I belive that there is proper solution to address the issue.
Best,
Jacek- ImkeF4 years agoCommunity Champion
Hi jaryszek ,
I'm not sure what your requirement exactly is, i.e. what you want to do with that type facet "Int.64 Type", as the Power Query engine itself will ignore it.
More background info on that here: Power Query M Primer (Part 17): Type System II – Facets | Ben Gribaudo
If I know what you want to do exactly with it, I might be able to search for a solution.
Please read the article thoroughly and pay attention to the difference between ascribing a type to a value and transforming a column and let me know which of it you need.- jaryszek4 years agoSuper User
ImkeF thank you Imke.
Ok so i understand that Power Query will ignore not primitive types and will result only primitve ones like number.
the task is simple, i have string Int64.Type in another table and if i will pass to the function i want to get exactly Type Int64.Type , not number.
If this is not possible hmm, so how Power Query knows to use Int64.Type ?Best,
Jacek