Forum Discussion
DATATABLE DAX giving error with multiple values
Hi,
I am trying to create a datatable with DAX using the function below:
_Test Param = DATATABLE("TestParam",STRING,{{"Test"},{"Test2"}})
PowerBI gives me an error indicating a table of multiple values was supplied where a single value was expected.
If I remove "Test2", it seems to work ok.
_Test Param = DATATABLE("TestParam",STRING,{{"Test"}})
How do I create a datatable with multiple values?
Thanks,
Kevin
Anonymous you are creating a table, you will go to modelling -> new table
you cannot add table as a column
✨ Follow us on LinkedIn
Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
4 Replies
- parry2kSuper User
Anonymous you are creating a table, you will go to modelling -> new table
you cannot add table as a column
✨ Follow us on LinkedIn
Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
- AnonymousNot applicable
Ok thanks. That resolves my issue.
- parry2kSuper User
Anonymous not sure why you are getting error, it works for me:
✨ Follow us on LinkedIn
Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
- AnonymousNot applicable
Are you adding that as a new column?
This is what I am doing. I am adding as new column and then entering the DAX function.
Kevin