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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

slicer effect on dataframe

I used Transform -> Run Python Script (Python.Execute) to transform a existing table to dataframe i.e. df1.

However, I also used Run Python Script to do some computation based on df1 to return another dataframe i.e. df2

Then, I build a visual by calling columns from df2.

 

My question is that is it possible to apply a slicer on df1 (i have row-level security control on df1) such that filtering on one of the columns from df1 (by that slicer) can refresh the computation of my 2nd Python script which returns the df2?

 

Thanks so much.

3 REPLIES 3
v-chuncz-msft
Community Support
Community Support

@Anonymous ,

 

You may try to Edit parameters instead.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

please investigate. 

Anonymous
Not applicable

Sorry that I don't understand why the parameters can be helped for my expectation.

 

Let me try to provide more details:

1. There is a existing table which is imported by SQL i.e. Sales.

2. I created a blank query (named as Result) and use below script to transform Sales to df1:

    Python.Execute("# Python:",[df1=Sales])

3. I edit the "Run Python Script" under APPLIED STEPS and return another new dataframe named df2:

    import pandas as pd

    ...... (skipped)

    df2 = pd.merge(cluster_map, aggData, left_on='data_index', right_index=True,how='inner')

 

Upon completing above steps, the df2 becomes data of my power query - Result.

But filtering on Sales (by slicer) doesn't refresh the computation inside step 3.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.