Forum Discussion

AllanXu's avatar
AllanXu
Helper II
9 years ago
Solved

SQL Server large tables: how to ask user for the data date range being imported into PBI?

Hello,

 

I have a very large SQL server table that I need to create a PBI report based on.

 

There is no way to import all of the table's data into PowerBI. 

 

Each record has a date.

 

Is there any way to ask user the date range of the records when he refreshes data?

 

Thank you,

  •  

    AllanXu

     

    In this scenario, you can use Query Parameter in your Power Query.

     

    Just create two parameters StartDate and EndDate.

     

     

    It will query/refresh data based on the current value in the parameters.

     

     

    Regards,

2 Replies

  • v-sihou-msft's avatar
    v-sihou-msft
    Microsoft Employee

     

    AllanXu

     

    In this scenario, you can use Query Parameter in your Power Query.

     

    Just create two parameters StartDate and EndDate.

     

     

    It will query/refresh data based on the current value in the parameters.

     

     

    Regards,

    • Sunkari's avatar
      Sunkari
      Responsive Resident

      One option is query parameters.

       

      Another one is creating partitions at database level and adding proper where condition in source query, which will improve the performance and restricts data at required time period.