Forum Discussion
Why DATATABLE dax with single column not accepting multiple values
I am getting an error that only single value is expected to pass and unable to understand this. Here I'm creating a new column in existing table.
Mass UoM = DATATABLE("Mass UoM",STRING,{{"Kg"},{"Lb"}})
Anonymous , datatable returns a table, so this is not a function you should use for the column
https://docs.microsoft.com/en-us/dax/datatable-function#return-value
what you need in column
You may have a column like
Switch(True(),
[Column] = 1, "Kg" , "Lb")
4 Replies
- amitchandak
Super User
Anonymous , Hope You are creating a new table. I am able to do that
Table = DataTable("Mass UOM", STRING ,{ {"Kg"}, {"Lb"} } )- AnonymousNot applicable
Understood. But I'm creating a new DATATABLE column in existing table.
- amitchandak
Super User
Anonymous , datatable returns a table, so this is not a function you should use for the column
https://docs.microsoft.com/en-us/dax/datatable-function#return-value
what you need in column
You may have a column like
Switch(True(),
[Column] = 1, "Kg" , "Lb")
- AnonymousNot applicable
Hi,
I am not sure what you are tring to accomplish here. Could you be more specific?