Forum Discussion

aar0n's avatar
aar0n
Icon for Advocate II rankAdvocate II
8 years ago
Solved

How to create a Calculated Table for Future Values in from a Unique Name list

Hi guys,    I am looking to create a calculated table where the date column starts after a different query ends.   Here is a sample table of my Original dataset Type Name Last date in datas...
  • Zubair_Muhammad's avatar
    8 years ago

    Hi aar0n

     

    Try this Calculated Table

    From the Modelling Tab>> New Table

     

    New Table =
    ADDCOLUMNS (
        GENERATE (
            TableName,
            GENERATESERIES ( TableName[Last date in dataset] + 1, DATE ( 2020, 1, 1 ) )
        ),
        "myvalue", TableName[Last Known Value ]
            * .77
            ^ ( 1 / 12 )
    )
  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    8 years ago

    Hi aar0n

     

    In that case, create a New Table which will give you Month Numbers

     

    Table =
    GENERATE (
        TableName,
        GENERATESERIES (
            1,
            DATEDIFF ( TableName[Last date in dataset], DATE ( 2020, 1, 1 ), MONTH )
        )
    )

    Then you can add a calculated column to get Month End Dates

     

    Column =
    EOMONTH ( 'Table'[Last date in dataset], 'Table'[Value] )

     

  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    8 years ago
    HI
     
    From your last post I noticed this. So I think adjusting the POWER by -1 should fix it.
     
    My VALUE =
    'Table'[Last Known Value ]
    * ( 0.77
    ^ ( 1 / 12 ) )
    ^ ('Table'[Value that represents the month]-1)