Forum Discussion
Managing and Exporting High-Volume Datasets (~1M Records) in Power BI
Hi Gabry, v-hashadapu ,
So I was going through some posts I did come across one video wherein they have demonstrated how to export more records (more than the limit). In the video the instructor mentioned 3 approaches:
i) Method-1: Using the DAX query view (in-built in Power BI Desktop) wherein we simply use: EVALUATE 'table_name' and run the DAX query and copy the data into a csv/excel
Con: The limitation is it only supports upto 500K records, beyond that not possible.
The next two approaches that were been discussed were using External Tools:
ii) Bravo
iii) DAX Studio
In both these tools all we need to do is simply select the table, the export type (excel or csv) and done.
This is better, but now for the end-user to simplify this process can we do something like within a button click (let's say we select the table) and start the export process (by calling any of the external tool explicitly).
Considering the end-user to be a non-technical person they want this process to be simplified like few clicks.
If you have any inputs with respect to this, please do let me know.
Regards,
Sidhant.
Hi,
I’m not sure I fully understand why you’d prefer using Bravo or other external tools, when you already have Fabric notebooks, UDFs, and OneLake available. Is there something specific missing from this approach?
I’m not too familiar with how those tools work under the hood, maybe they rely on the XMLA endpoint?
In any case, if the goal is to add a button inside the report, as far as I know you’d still need to use either Power Automate or a UDF. I’m not aware of other options
- Sidhant11 months ago
Advocate V
Hi Gabry ,
Thanks for the reply, I had shared the external tools as one way (kind of backup). Earlier you did mention to make use of Notebooks since I haven't worked on that front can you please let me know how to achieve (the required functionality) and with Power Automate, if you have any resources that can help to get this (I have worked with Power Automate before but not such a large data).
I did not get 'UDF', what's that.
Regards,
Sidhant.- Gabry11 months ago
Super User
Thanks for the updates! I understand your point about using external tools like Bravo or DAX Studio for exporting data, but I think it’s worth considering the advantages of using Fabric Notebooks, UDFs, and Power Automate for this kind of task, especially when working with large datasets.
The main benefit of the Fabric + Power Automate approach is that it offers a more streamlined, scalable, and integrated solution.
Here’s how the flow could work:
Power BI Report: Users select fields via slicers or parameters.
Power Automate Flow: The flow captures user selections (through a Power BI button).
Fabric Notebooks: The notebook processes the selected data (filtering, formatting) and exports it as CSV/Excel to OneLake or Blob Storage.
Automated Notification: The flow sends the user an email with the exported file or a link to the file in storage.
Using Power Automate and Notebooks will let you handle much larger datasets efficiently, and it integrates seamlessly into existing Power BI workflows. Additionally, as you've mentioned, bypassing the Power BI export limit (150k rows) is easily achievable with this approach.
On the oder side you can also check translytical task flowsIt leverages UDFs (User Data Functions), allowing you to place a button in the Power BI report that captures the filter context and uses it to run a notebook or python code to export the data you need.
- Sidhant11 months ago
Advocate V
Hi Gabry,
Thanks for give an idea about how the flow will look like, so I was trying to create a flow had few queries with respect to it:import json # 1. Get JSON string from Power Automate (filters parameter) filters_str = dbutils.widgets.get("filters") filters = json.loads(filters_str) print("Received filters:", filters) # 2. Load data df = spark.read.sql(""" SELECT OrderID, Name, Profit, Quantity, OrderDate, Region FROM SalesTable """) # 3. Apply filters dynamically for col, val in filters.items(): if isinstance(val, list): # Multiple selections from slicer df = df.filter(df[col].isin(val)) else: # Range handling for dates or numbers if "Start" in col: base_col = col.replace("Start", "") df = df.filter(df[base_col] >= val) elif "End" in col: base_col = col.replace("End", "") df = df.filter(df[base_col] <= val) else: # Single value equality df = df.filter(df[col] == val) # 4. Save to OneLake / Blob output_path = "abfss://[email protected]/SalesExports/FilteredExport.csv" (df .coalesce(1) # single file .write .mode("overwrite") .option("header", "true") .csv(output_path)) print("✅ Export completed:", output_path)The above code was for the Fabric notebook (to accept dynamic range of filters which means there can be n slicers that can be added later so the code should not fail if newer one's are added). Ovver here I was not sure what should be added as the output_path (should I add the URL of lakehouse)
Then coming to the Power Automate flow:
Then in the compose action I was using the JSON body to build the Request body which looks like:
{ "notebookExecution": { "parameters": { "filters": "@{json(triggerBody()?['filters'])}" } } }Then to run the Fabric Notebook using the HTTP action (premium connector), I did across two URL that can run a notebook:
1st: https://api.fabric.microsoft.com/v1/workspaces/{{WORKSPACE_ID}}/items/{{ARTIFACT_ID}}/jobs/instances (Received from ChatGPT)
2nd: (which is been used currently and here we don't need to pass anything in the body i.e. empty)
https://api.fabric.microsoft.com/v1/workspaces/{workspace_id}/items/{artifact_id}/jobs/instances?jobType=RunNotebook
But the issue is I am not sure how to pass the filters (Compose action output if I used the 1st URL and to generate the token do I need to register an app (how to get the token))
-> The next step was to poll the notebook untill it returns 200 (succeded) using the GET request within it and which uses the status code from the previous HTTP action, but here I needed o get the JobInstanceID not sure on how to get that# GET URL: GET https://api.fabric.microsoft.com/v1/workspaces/{{WORKSPACE_ID}}/items/{{ARTIFACT_ID}}/jobs/instances/{{jobInstanceId}} Right now I have the workspace and ARtifact id which we can find in the URL of the Fabric notebook.ANd the next steps were to the notebook should save the filtered data in OneLake and using GET link to retrieve the link of the file stored (location) and finally using send email action notify user.
So can you help me out here and is the above flow design correct?.
Poojara_D12 , v-hashadapu : If you have anything to to do please do share them as well.
Regards,
Sidhant