Hi,
Is there a way to create calculated columns on the step of creating new table?
Example: I need to get Fiscal year column, so I try this:
Dates = ADDCOLUMNS(CALENDAR(date(2015,1,1),date(2017,12,31)),
"DateAsInteger", FORMAT ( [Date], "YYYYMMDD" ),
"Year", YEAR ( [Date] ),
"Month number", month( [Date]),
"YearQuarter", FORMAT ( [Date], "YYYY" ) & "/Q" & FORMAT ( [Date], "Q" ),
"Financial year", IF(Dates[Month number]>6,Dates[Year]+1,Dates[Year])
)
This example doesnt work. I guess it's because the Dates table doesn't exists at this point.
I know I could just create the table first and then add new column with expression that I need, but I have many calculated columns and measures, that I use for different files. Some of them I've been able to put together in one step, but those are only cases, when I work with column from the source table..
So is there any other option, how to create some columns in one step or how to transfer formulas between different files?
Thanks,
Zuzana