Forum Discussion
calendar cannot be blank
i use measure not colomn therefore max and min not work with measure may be
 
waleed111
Go to Modeling Tab click on New Table and paste this code, Your measures Start Date and End Date will be accepted.
Please show how those measures are calculated.
Date = CALENDAR('List View'[start date],'List View'[end date])
I did an experiment creating a calendar table with Measures
________________________
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 🙂
- Fowmy6 years agoSuper User
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 🙂
- MFelix6 years agoSuper User
Measures are accepted as values in tables, however since measure are based on context, the result is not dinamic, so if you have two measures with MIN(Table[Date]) and MAX(Table[DAte]) this values will always pick up the maximum and minimum value of the table that you refer to, they are no dinamic.
To my experience ussualy when people use measure in table it's because they want the dinamic part of the measure so when they select the slicer or change a parameter or something like that the table is dinamic, and that doesn't happen because as you know measures a context base so when you pick up a measure it get the table context and not the row context so the values are always the same and don't change no matter what you do with the other context settings like slicers, filters, or similar.
That's the reason why I refered that measures cannot be used, better said measures should not be used in a table creation.
But great answer.
- waleed1116 years agoHelper V
now when i try to make colomn like this
Date = CALENDAR(MIN('List View'[start date]), MAx('List View'[end date]))it show me this errorA table of multiple values was supplied where a single value was expected.should i make it table and why?*[start date] and [end date] are colomn now not measure - waleed1116 years agoHelper V
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?
- waleed1115 years agoHelper V
i want to make a date column from lowest value in the all tables to largest value
- waleed1115 years agoHelper V
i dont uderstand your question, please more explanation.
- waleed1115 years agoHelper V
You want to add a column with all the dates in possible in your table? yes
- MFelix5 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.
- waleed1115 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/