Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi All,
I've been trying to load data from the ENTSOE platform (https://github.com/EnergieID/entsoe-py) using python.
Works pretty well using Anaconda/JupyterLab, but when I use the same code in powerbi, some random data just isn't picked up.
Any idea why that could happen?
My original code exports from python to excel and everything loads properly.
I was thinking maybe some format error stops powerbi from loading the data, or maybe memory within the variable (although I tried increasing), or anything else...
The code:
from entsoe import EntsoePandasClient, Area
import pandas as pd
import numpy as np
client = EntsoePandasClient(api_key="f9e2dc92-2ac1-4d27-806c-2382356c9530")
from datetime import datetime
today = datetime.today().strftime('%Y%m%d')
# Start and end points of import
start = pd.Timestamp('20220101', tz='Europe/Berlin')
end = pd.Timestamp(today, tz='Europe/Berlin')
# Generation volumes
df = client.query_generation('BE', start=start, end=end, psr_type='B14')
# Set index column to correct format
df.index = df.index.strftime('%D/%M/%Y')
# Remove last 6 characters
df.index = df.index.map(lambda x: str(x)[:-8])
--
If going to excel, I add the following:
with pd.ExcelWriter(r'FILELOCATION\FILENAME.xlsx') as writer:
df.to_excel(writer, sheet_name = 'BE_Gen_latest')
The idea is to not generate excel files and import the data directly through PQ. Any idea why it would be 'skipping' some chunks of data? It's not even randomised as it's always the same pieces missing.
Since it's hard to debug in PQ, import the correct Excel file generated by Python into PQ.
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 10 | |
| 9 | |
| 8 | |
| 7 |