Add calculated tables and columns to Power BI Desktop models
We can write a Data Analysis Expressions (DAX) formula to add a calculated table to our model. The formula can duplicate or transform existing model data to produce a new table.
A calculated table formula must return a table object. The simplest formula can duplicate an existing model table.
Calculated tables have a cost: They increase the model storage size and they can prolong the data refresh time. The reason is because calculated tables recalculate when they have formula dependencies to refreshed tables.
Create calculated table and Column
By clicking on modeling tab and selecting new table we can write the DAX function in order to create new table and for the calculated column also we can write DAX function in order to get new column to the existing table.
How to Create data table?
Date = CALENDARAUTO(6)
The CALENDARAUTO function takes a single optional argument, which is the last month number of the year, and returns a single-column table. If you don't pass in a month number, it's assumed to be 12 (for December). For example, at Adventure Works, their financial year ends on June 30 of each year, so the value 6 (for June) is passed in.
Effectively, the CALENDARAUTO function guarantees that the following requirements to mark a date table are met:
The table must include a column of data type Date.
The column must contain complete years.
The column must not have missing dates.
Comments
Post a Comment