Forum Discussion

Sunkari's avatar
Sunkari
Icon for Responsive Resident rankResponsive Resident
9 years ago

Small observation regarding time series analysis

Hi All,

 

I have following model.

Fact_Table(Revenue,Date(Datetype),Datekey(Integer))----(100,"2017/01/01",20170101)

DimDate(Date(Datetype),Datekey(Integer))---("2017/01/01",20170101)

 

 

I can relate both tables either by Datekey or Date column. If I relate based on datekey, time series related functions are not working like ytd,previous year etc where as if i relate with Date they are working fine.

 

What's the root cause of the issue? is it a bug? if not, what's reason for this behavior? Ideally, context should propagate to other tables irrespective of a related column.

 

 

 

 

5 Replies

  • vanessafvg's avatar
    vanessafvg
    Icon for Community Champion rankCommunity Champion

    Sunkari well datekey is a integer and date is a date type, therefore you will not get data functionality off an integer

    • Sunkari's avatar
      Sunkari
      Icon for Responsive Resident rankResponsive Resident

      I am using date for all calculations.

       

      Something like: Calculate(sum(revuenue),Dateadd(dimdate[Date],-1,Year))

       

       

      • vanessafvg's avatar
        vanessafvg
        Icon for Community Champion rankCommunity Champion

        Sunkari i dont see any issue with that working as long as date is of date data type is there a problem?

  • v-jiascu-msft's avatar
    v-jiascu-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi Sunkari

     

    Context is a very complicated concept and is a powerful tool that makes the limited number of functions to do more. As far as I know, "Datekey" usually is a bridge to create relationships. The actual "Date" column will be used in the report. Hope this would help.

     

    Best Regards!

    Dale