Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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.
@Anonymous ,
You may try to Edit parameters instead.
please investigate.
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.
User | Count |
---|---|
102 | |
88 | |
78 | |
71 | |
69 |
User | Count |
---|---|
113 | |
99 | |
97 | |
72 | |
68 |