Forum Discussion

TePe's avatar
TePe
Helper IV
7 years ago

Time Intelligence with Direct Query

Hi,

 

I know about the limitations of Time Intelligence when using Direct Query (i.e. you don't see Time Intelligence in the Quick Measures). However digging into the documentation (https://docs.microsoft.com/en-us/power-bi/desktop-directquery-about) I found this sidenote: "Note however that if there is a Date table available in the underlying source (as is common in many data warehouses) then the DAX Time Intelligence functions can be used as normal.".

 

I tried that with a Azure SQL DWH and the AdventureWorks DW sample db (you need to delete 2006 dates from dimDate to make it working). Functions like DATESYTD seem to work fine however the Time Intelligence related Quick Measures are still not available.

 

Anyway I tried the same with a view on the DWH. So I joined the facts with the dimDate (so now I don't have a separate date table anymore) and it still works?!?! And Time Intelligence features are still missing in the Quick Measures...

 

So what's the benefit of having a date table in this case (I know about the usual advantages)?

 

Bug or feature? ;-)

 

Thanks,

8 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable
    Mate, your DW Date table has to follow exactly the same rules as the Date table in PBI has to. If that's not the case, forget about any time-intel calculations.

    Best
    Darek
    • TePe's avatar
      TePe
      Helper IV

      Darek,

       

      thanks for you feedback. When I look at https://docs.microsoft.com/en-us/power-bi/desktop-date-tables I only see that I need to mark my DimDate as the date table (the scenario I talked about when I had separate date and fact tables). That's what I did, the assistant is so nice to check field setting and data quality in the date table on its own... Still no Time Intelligence in Quick Measures and still DATESYTD works...

       

      Best Regards,

       

       

      Thomas

      • Anonymous's avatar
        Anonymous
        Not applicable
        Is you Date table marked as such in PBI? Does it join to the fact table on the right field in the model? Does it cover all the years in full that are present in the columns to which it's joined? If the conditions are satisfied, then you should have no problem with the time-intel functions.

        Best
        Darek