Forum Discussion
Function expects a column name as argument number 4? Help :-)
- 8 years ago
Hi unclejemima
Yes... AddColumn is a function which returns a Table......It cannot be used in Calculated Columns and Measures....Directly..
However you can use this code as a CALCULATED TABLE
So if you go to Modelling Tab>>New Table and paste this code...you will get an entirely new Table in your Model
haha. I'm such a noob. I have no clue.
The screenshot came from this thread http://community.powerbi.com/t5/Desktop/how-to-build-a-calendar-table-with-date-and-time/m-p/374493#M170076....and it looked exactly what I wanted to do.
Basically I have a calender table and I'm trying to get hours and minutes on it...so I went to my existing Calender table, made a new calculation column, pasted the formula in my first post in and keep getting the error.
Is it not supposed to be a calculated column?
Hi unclejemima
Yes... AddColumn is a function which returns a Table......It cannot be used in Calculated Columns and Measures....Directly..
However you can use this code as a CALCULATED TABLE
So if you go to Modelling Tab>>New Table and paste this code...you will get an entirely new Table in your Model
- unclejemima8 years ago
Post Patron
Epic! You are awesome!!!
Well, there was one to many comma's though in the first formula right? So you helped me figure that as well :-)
Thank you!!!!!