cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Khaoula_Farissi
Frequent Visitor

Python analysis

hello evryone i wish i can find a solution here
so my problem is that i have data in sql server with these columns (respondant,sexe, age,region,Q1,Q2,Q3,Q4) i want to analyse it so i chose python script or R script in powerbi/getdata
and when i analysed my data i got two dataframes one is a correlation between (Q1,Q2) and one of clustring. But when i whant to filter by (age, sexe,...) i can't get those columns in my dataframes
PS: The data and analysis are just exmaples so my database is actually a lot bigger and i have to do a lot of analysis that powerbi can't provide so i chose python or R.

4 REPLIES 4
v-diye-msft
Community Support
Community Support

Hi @Khaoula_Farissi 

 

For " But when i whant to filter by (age, sexe,...) i can't get those columns in my dataframes" , do you mean you'd like to filter the source data before imported into Power bi desktop? You can take a shoot of the advanced options

003.PNG

For "The data and analysis are just exmaples so my database is actually a lot bigger and i have to do a lot of analysis that powerbi can't provide" , could you plz share more concerns about " Power bi can't provide"?

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

hello @v-diye-msft thanks for the reply

i want to filter my data after importing it to powerbi.

to explain more here is an example of my database in sql server

Khaoula_Farissi_0-1597850895610.png

and here is the dataframe that i recieve from python' scrpit

Khaoula_Farissi_1-1597850951339.png

i want to be able to get the correlation of (Q1,Q2,Q3) of women when i chose women in the slicer or get the correlation of a chosen age 

mahoneypat
Super User
Super User

FYI too that you may be able to do your R or Python analyses at the visual level, instead of in the query (for more flexibility, use of slicers, etc.).  Please see this post I wrote a while ago that may give you some ideas.

https://powerpivotpro.com/2018/11/hijacking-the-r-visual/

 

If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


@mahoneypat  thanks for your reply

I did one time use python visual but for unknown reasons it gave me the wrong data and my second reason is that i'm using visuals like infographic designer which i cannot find in python visual, plus the easy usage of powerbi visuals considering i got 42 visuals

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.