Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

restrict loading of dataset

Can i restrict number of rows to load in dataset by applying where clause.

Requirement is i dont want complete data to be imported in pbix but need data for 10 clients only.

 

Instead of applying where clause in sql end, can i do something at pbix end so it doesnt load all clients data?

 

Kindly help.

8 Replies

    • Thejeswar's avatar
      Thejeswar
      Icon for Super User rankSuper User

      Hi Anonymous,

      Yes you can filter the data set in PBIX Power Query window which you get when you click on edit Queries, just like the way you do in excel.

       

      Click on the column drop down and filter the items that you want

      • Anonymous's avatar
        Anonymous
        Not applicable

        Thanks alot for help

  • Abhilash7181's avatar
    Abhilash7181
    Frequent Visitor

    In Option 2, the entire dataset is first loaded into Power BI, and then filters are applied at the visual level. This means that while the report contains all client data, only the restricted client information appears in the visuals.

    However, loading the full dataset before filtering can impact performance, especially with large datasets. A more optimized approach is to apply filtering at the source level using a SQL query before loading data into Power BI. This reduces the dataset size and improves report performance.

    For example, instead of bringing in all client data and filtering later, you can use a SQL query with a WHERE condition to load only the required data:
    SELECT *
    FROM Clients
    WHERE Region = 'West' -- Load only data for the 'West' region

    This ensures that only relevant data is imported, leading to faster refresh times and improved report efficiency.

    Regarding dataset size, you can check it in the Group Storage Section in Power BI Service, where it provides details on how much space your dataset occupies. Below is an image showing where you can find this information.