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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
PBI-Beginner
Frequent Visitor

Python Visual built using data from two tables, no relationship. Any workarounds?

Hi, 
 
I understand PowerBI Python visuals have a limitations when it comes to plotting from two different datasets with no relationships. However I was wondering if there could be a workaround in my case.

 

I want to plot a PCA scatter plot with product data and a static confidence ellipse with static product training data (this data must not be affected by slicers). Then have a date slicer that I can filter the product data by date to see how many of my product points fall within the static ellipse and if I have any outliers.

 

Product Data (sample):

DatePC1PC2
07-05-200.230.25
08-05-200.280.29

 

Training Data (sample)

PC1_TrainPC2_Train
0.240.26
0.28

0.22

 

Is there any way to build that static ellipse from the training data table and without having to define any relationship? I thought of including the training columns in my Product Data column but then the date slicer affects the Training Data, effectively changing the ellipse everytime I slice making the comparisons difficult 

 

 

Is there any workaround that I can explore or do I just have to get rid of the date slicer (which will be a major feature loss).

 

Extract of my python visual code:

plt.scatter(a, b) #Scatter plot with product data
plt.plot(c * np.cos(t), d * np.sin(t) , color = 'black') #Plot Ellipse with training data

#Where a and b are columns with Product PC1 and PC2 data which is expected to be sliced
#C and D are linked to PC1 and PC2 Training data currently from a different table

WIll appreciate any help.

2 REPLIES 2
v-kelly-msft
Community Support
Community Support

Hi @PBI-Beginner ,

 

Pls refer to :

 

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

 

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

Hi @v-kelly-msft ,

 

Thanks for your reply.

 

I tried creating an inactive relationship between the two tables as a workaround but the python visual refused to work, demanding for an active relationship.

 

In my case, I need a static confidence ellipse to be created from two columns on table 2, and that data (on table 2) must not be affected by any slicers or filters applied to data on table 1 (hence the inactive relationship).

 

Regards,

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.