Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I have a scenario where I need to remove all columns of the data type integer from the table.
I need to do this in Powerquery and can not do it manually.
This is what im currently using:
= Table.RemoveColumns(#"Changed Type",Table.ColumnsOfType(#"Table1", {Int64.Type}))
With this string of code I'm able to remove date or text formatted columns by changing the value from Int64.Type to type text or type date.
But for some reason when I use Int64.Type it removes both decimal numbers as well as integers. The same happens if i try and use type number. For some reason it seems that Table.ColumnsOfType() is unable to differentiate between the two.
Does anyone know if this is intended or what the syntax would be if i want to remove just integer columns?
Also, the above code does not appear to work after you have used the Table.TransformColumnTypes() function on the column. If anyone knows why this is I'm really curious! 🙂
Br,
Johannes
Solved! Go to Solution.
HI, @tex628
I also did a lot of testing, It seems that Int64.Type, Percentage.Type, and Currency.Type have no difference with type number in Table.ColumnsOfType().
I'm afraid it is difficult to achieve in Power query for now. If you could do it manually or do it in the datasource.
Best Regards,
Lin
HI, @tex628
I also did a lot of testing, It seems that Int64.Type, Percentage.Type, and Currency.Type have no difference with type number in Table.ColumnsOfType().
I'm afraid it is difficult to achieve in Power query for now. If you could do it manually or do it in the datasource.
Best Regards,
Lin
I managed to achieve the end goal through a different method, not related to this at all. But it's good to know how it is so thanks for the insight! I hope that this might be implemented in the future as it would be a very helpfull function!
Br,
Johannes
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
85 | |
67 | |
59 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |