Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Loop through sql server table to read a set of data in each iteration and do unpivoting

Hi PowerBI experts,   I am getting data from Excel files (around 400 files from a folder location). These excel files have yyyymm values starts at the cell J28. And i need to unpivot all the 12 yyy...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Anonymous 
    There is a Query Parameter feature allows you to dynamically change the excel tables based on the sequence you selected. However, I am not sure whether you can bring the parameter together with Pbi dataset back to SQL. You may try export power bi dataset to SQL afterwards: Exporting Power BI Data to SQL Server (biinsight.com).

     

    Please refer to my example for using parameter on excel files:

    1.  Connect to the folder that has all excel files, OK=>Transform.

     

    2. Add an index column from 1, right click the index column=>add as new query.

    3. Create the a parameter based on the new query.

     

    4. Once parameter is created, set it as filter to the index column. 

     

    5. The final step is to expand the excel table, Close and Apply.

     

    You then can dynamically change the displayed table data using parameter.

     


    Paul Zheng _ Community Support Team
    If this post helps, please Accept it as the solution to help the other members find it more quickly.