Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
hald1r
New Member

Creating a new table using DAX

Sorry for stupid question in advance- i have to create a new table, only using dax, name it and name the column (for dates since 

January,1,2019 to February,1,2019).

 

Is it a way i can do it using DAX? 

 

Tried  

CALENDAR(DATE(2019,1,1),DATE(2019,1,1))
but i can't name the table and rename the column for further using in DAX query (i need additional calculations in this query after creating and naming the table, and all it should be done by DAX only).
 
Thank you!
3 REPLIES 3
Ste_For94
Frequent Visitor

I guess you're trying to do this

 

CustomTableName = SELECTCOLUMNS(CALENDAR(DATE(2020,01,01),DATE(2020,07,01)),"CustomColumnName",[Date])

Thank you! Could you also tell me, how can I use it in one DAX query?

 

I need to create this table and instantly combine it with another table with sales:

 

Initial data:

 

DateSales
1Jan3
3Jan6
5Jan7

 

I need to receive as a result:

 

DateSales
1Jan3
2Jan0
3Jan6
4Jan0
5Jan7
6Jan0

7Jan

0

 

and I have to create and use a table with dates in one dax query

lbendlin
Super User
Super User

go to the table view in Power BI (second icon), then click "New table" and enter the DAX code for the table that you want, incuding the additional columns.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors