Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
I would expect that the following statement adds a new column with lists of numbers:
Table.AddColumn(#"Table", "Test", each {1, 2, 3})
Instead, the items in the lists are the numbers in text(!) format:
How can I avoid this?
Solved! Go to Solution.
Though it shows left aligned but type is number only. If you use following, you will find that TRUE is populated in the list
= Table.AddColumn(#"Table", "Test", each List.Transform({1, 2, 3}, (x)=>x is number))
if you use this, you will find FALSE
= Table.AddColumn(#"Table", "Test", each List.Transform({1, 2, 3}, (x)=>x is text))
Now, the type is set for the column not for list which you can do with below statement
= Table.AddColumn(#"Table", "Test", each {1, 2, 3}, type {Int64.Type})
When you expland this column, you will column type is set to Whole number. Otherwise column type will be set to Any.
= Table.AddColumn(#"Table", "Test", each {1, 2, 3}, type {Int64.Type})
Though it shows left aligned but type is number only. If you use following, you will find that TRUE is populated in the list
= Table.AddColumn(#"Table", "Test", each List.Transform({1, 2, 3}, (x)=>x is number))
if you use this, you will find FALSE
= Table.AddColumn(#"Table", "Test", each List.Transform({1, 2, 3}, (x)=>x is text))
Now, the type is set for the column not for list which you can do with below statement
= Table.AddColumn(#"Table", "Test", each {1, 2, 3}, type {Int64.Type})
When you expland this column, you will column type is set to Whole number. Otherwise column type will be set to Any.
= Table.AddColumn(#"Table", "Test", each {1, 2, 3}, type {Int64.Type})
@Vijay_A_Verma wrote:Though it shows left aligned but type is number only.
This is really strange! Do you have an explanation why it's shown left aligned?
Table.AddColumn(#"Table", "Test", each List.Numbers(1,3,1))
--Nate
"{1, 2, 3}" was just an example.
Anyway, your solution gives the same result as described as an issue by me above.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
31 | |
29 | |
19 | |
15 | |
12 |
User | Count |
---|---|
19 | |
16 | |
11 | |
10 | |
9 |