Forum Discussion
Create table with modifications based on existed one
- 7 years ago
giorgi_lommidd there are many posts which will help you to add date dimension in your model. Here is quick expression to add Date Dimension
On moelling tab, click New Table and add following expression, change date range as per your dataset
Dim Date = CALENDAR( DATE(2019,1,1), DATE(2019,12,31))
You will have new table in your model, now set relationship with Dim Date. Date column with your transaction table, it will be one to many , one on date side, many on transaction side.
Add new measure
Total Amount = SUM( TransactionTable[Column] ) + 0
Now add table visual, put Date column from dim date and Total Amount measure and you will see all the dates and missing dates will have zero value
giorgi_lommidd why not have date dimension in your model and link it with your t1 table and then write measure to have zero value for missing dates, you will see continuous dates from your date table in all the visualization.
Thanks for responce,
Can you please provide example of dax code ?
- parry2k7 years ago
Super User
giorgi_lommidd there are many posts which will help you to add date dimension in your model. Here is quick expression to add Date Dimension
On moelling tab, click New Table and add following expression, change date range as per your dataset
Dim Date = CALENDAR( DATE(2019,1,1), DATE(2019,12,31))
You will have new table in your model, now set relationship with Dim Date. Date column with your transaction table, it will be one to many , one on date side, many on transaction side.
Add new measure
Total Amount = SUM( TransactionTable[Column] ) + 0
Now add table visual, put Date column from dim date and Total Amount measure and you will see all the dates and missing dates will have zero value