Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Apply a filter to data from Bigquery when navigating to the table

Hello,

I've connected to Bigquery using PowerQuery. When I try and connect to a table it's asking me to apply a filter on the date. 

 

 

 

DataSource.Error: ODBC: ERROR [42000] [Microsoft][BigQuery] (70) Invalid query: Cannot query over table 'xxxxxx.3000.sales' without a filter over column(s) 'date' that can be used for partition elimination
Details:
    DataSourceKind=GoogleBigQuery
    DataSourcePath=GoogleBigQuery
    OdbcErrors=[Table]

 

 

 

 

How should I edit this formula to include this date filter?

 

Best regards

Bas

  • Right click Navigation in Applied Steps and choose "Insert Step after". Then add a custom step with a filter. E.g.

    = Table.SelectRows(#"Previous Step", each [Merchant] = "testmerchant")

    Replae #"Previous Step" with the text that is generated by default when you do "Insert Step After" .

6 Replies

  • artemus's avatar
    artemus
    Microsoft Employee

    Right click Navigation in Applied Steps and choose "Insert Step after". Then add a custom step with a filter. E.g.

    = Table.SelectRows(#"Previous Step", each [Merchant] = "testmerchant")

    Replae #"Previous Step" with the text that is generated by default when you do "Insert Step After" .

  • Anonymous's avatar
    Anonymous
    Not applicable

    Aaah itโ€™s that easy ๐Ÿ˜Š Thank you very much artemus , that was exactly what I was looking for!

    Best regards

    Bas

  • Anonymous's avatar
    Anonymous
    Not applicable

    I have similar issue.  After trying "Right click Navigation in Applied Steps and choose "Insert Step after", I could not see anything where I could add custom step with filter, but a item called "Custom1" created in "APPLIED STEPS".  If I right click on "Custom1", there is nothig I can edit!

     

    Not sure what I missed.

     

    Best regards,

    Yong

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Anonymous 

      Make sure you have the formula bar turned on. In PowerQuery go to VIEW and enable the checkbox for FORMULA BAR. You now see an extra bar where you can add the code.


      Does that do the trick?

      Regards

      Bas

      • Anonymous's avatar
        Anonymous
        Not applicable

        Thanks Bas, that did the trick!  Now I can see the Formula input.