Forum Discussion

giorgi_lommidd's avatar
7 years ago
Solved

Create table with modifications based on existed one

Hi All,  I have T1 table with two columns: date and val.  date column ranges from period A to Per. B,  but some dayes are missed in this period.   I need to create a new table T2 with same colum...
  • parry2k's avatar
    parry2k
    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