Forum Discussion
calendar cannot be blank
I absolutely agree on your points and am fully aware of it as well.
I am not sure about waleed111 purpose here, very little information provided to cater a solution.
if he is creating a standard calendar, it's not the proper way either.
________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
when i make it table it work but when i make it as colomn it not work why?
- MFelix6 years agoSuper User
Hi waleed111 ,
The syntax that you have return several values so you cannot add it has a column to another table because when add columns you are working ar row level context so one row one value.
Using that syntax you would get something similar to this:
Column1 New Colum a Date1 a Date2 a Date3 b Date1 b Date2 b Date3 What is the exact purpose you need to achieve?
- waleed1116 years agoHelper V
i want to make a date column from lowest value in the all tables to largest value
- waleed1116 years agoHelper V
i dont uderstand your question, please more explanation.
- waleed1116 years agoHelper V
You want to add a column with all the dates in possible in your table? yes
- MFelix6 years agoSuper User
Hi waleed111 ,
Sorry for the followup questions but to what I uderstand you want to had all the dates in other tables, so if you have a table 1 that has let's assume values for the 1st week for January and you maximum date is the last day of january you table will have a lot of blanks values except for the date:
Table1 (before column)
Date Value 01/01/2020 10 02/01/2020 30 03/01/2020 40 04/01/2020 50 05/01/2020 60 Table1 (after column)
Date Value New Date 01/01/2020 10 01/01/2020 02/01/2020 30 02/01/2020 03/01/2020 40 03/01/2020 04/01/2020 50 04/01/2020 05/01/2020 60 05/01/2020 06/01/2020 07/01/2020 ... 29/01/2020 30/01/2020 31/01/2020 Is the representation above correct?
If that is the expected result, and once again I apologize why don't you use a calendar table to make the relationship with you table that will return the values that you need and make it more dinamic without the need to duplicate values. Also this type of merge is better made in Power Query than in dax because when you want to had new rows you need to make a new table.
- waleed1116 years agoHelper V
my question is: can i assign the CALENDAR function with a column and if i can what is the conditions?
- MFelix5 years agoSuper User
Hi waleed111 ,
Not really sure what you mean by assign calendar function with a column?
The calendar function returns a table with a set of contiguous dates within the specified range, so basically you define the start and end date and it returns all the dates in between, this can be used to create a table on your model to use with different purposes.
Sorry once again but can you be more specific to tell what is the final result you want to achieve with this table/column on your model.
- waleed1115 years agoHelper V
i want to make unified date from all tables to use it in any report,
my question is can make a column by using CALENDAR function or it work with table just.
- MFelix5 years agoSuper User
Hi waleed111 ,
The calendar function creates a table and cannot be used to create a new column on another table, it will return the an error of multiple values were supplied where a single value is expected.
You can create a calendar table that get's the dates from all the date columns from your model and that is CALENDARAUTO but this has some limitations.
Please check the blog from SQLBI where they explain how to use both functions.
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/