Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Direct Query with Where clause for date time field

Hello    Trying to get my direct query with the where clause to fetch the records for the last 30 days from today from a table with date time format. I have tried the below approach and could not g...
  • artemus's avatar
    artemus
    6 years ago

    Such as:

     

    "SELECT COL1, COL2 FROM Table WHERE Date_Column > " & Start_date

     

    2. Usually not. As long as you don't get a warning about an operation not supporting direct query you are fine. Power Bi will append a where clause to the end of your query when filtering happens.

     

    E.g. if your query is:

    SELECT A FROM B.

     

    Then  when a user of the report click a filter, Power Bi will do something like:

    SELECT * FROM ( SELECT A FROM B) WHERE B == 'ABC'