Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
flapponi
New Member

using Python pandas plus matplotlib for advanced visuals

Hi,

I am new in this community. I am transferring some python codes into a power BI project in order to share with my colleagues. I put together a code to plot the cumulative sum of certain curves with fill colors in between. I transfer it ito power BI and the result is not what it should be expected (the code run fine on my jupyter notebook however). see below the

result

flapponi_0-1635327969186.png

expected (from jupyter notebook

 

flapponi_1-1635328010766.png

maybe I am pushing too much the limits, however is there anything I should consider?

 

 

2 REPLIES 2
dm-p
Super User
Super User

Hi @flapponi,

Without seeing your code or data I can only speculate, but it's highly likely that your dataset is being aggregated to distinct values by Power BI, which is it's default behaviour (vs. tools like Jupyter, which take a dataset as-is and process row-by row). You can confirm this by clicking the visual header and selecting Show as a table, which will likely confirm that you have less total rows in your visual than in your dataset.

dmp_0-1635379139890.png

 

The simplest solution is to add a column to your dataset that will ensure Power BI creates the desired level of granularity for your data frame in Python. This approach is written up in longer form (with illustration of the concept) here; while this post focuses on a specific visual, the approach is portable for any visual that needs the lowest level of grain possible. We've also discussed this consideration for another tool external to Power BI vs. internally here, which again uses this approach and may help clarify further.

If this approach does not solve, you may need to provide further information on your dataset for us to help further.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Hi ,

 

txs for yuor prompt answer! the dataset seems to be correct. I have plotted using a bar chart with continuous axis and I get the desired result (see image below). however this visual has a very annoying limitation as it seems not to allow to sort the axis value according to your prreference (ascending or descending).

flapponi_0-1635410578435.png

 

Interestingly adn surprisingly, this is only allowed using categorical y axis type!?!? but this visual is not really necessary as there are way toomany categories in this way and I would eneed to downsample my data (the y axis is technically a continuous data type)

 

flapponi_1-1635410658147.png

 

I'll see the best way to share a subset of my data and code for a test if you like to.

 

Txs again and regards

 

Fabio

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.

Top Solution Authors