Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered
I want to implement something like this:
In a Notebook, there is a dataframe DF with its column name 'Success'. If the sum(DF$success)>0, then I want to trigger the next flow.
Can someone show how to implement this?
Solved! Go to Solution.
Hi @tan_thiamhuat ,
Yep, you can do this in your notebook by checking the sum of the 'Success' column and then using mssparkutils.notebook.exit to pass a value back to the pipeline. Here’s an example in PySpark:
success_sum = DF.selectExpr("sum(Success)").collect()[0][0] if success_sum > 0: mssparkutils.notebook.exit("trigger_next") else: mssparkutils.notebook.exit("do_not_trigger")
In your pipeline flow, you can use the output value from the notebook activity to decide whether to trigger the next activity/flow or not. Just set up a conditional check in the pipeline based on the notebook’s output string.
Let me know if you need more details or some other way to handle it.
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
Hi @tan_thiamhuat ,
Yep, you can do this in your notebook by checking the sum of the 'Success' column and then using mssparkutils.notebook.exit to pass a value back to the pipeline. Here’s an example in PySpark:
success_sum = DF.selectExpr("sum(Success)").collect()[0][0] if success_sum > 0: mssparkutils.notebook.exit("trigger_next") else: mssparkutils.notebook.exit("do_not_trigger")
In your pipeline flow, you can use the output value from the notebook activity to decide whether to trigger the next activity/flow or not. Just set up a conditional check in the pipeline based on the notebook’s output string.
Let me know if you need more details or some other way to handle it.
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
I have this two conditions:
## when there is CSV file to be processed
It always go to the False loop, even if there is CSV file available to be processed. Is my logic correct?
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Fabric update to learn about new features.
User | Count |
---|---|
55 | |
22 | |
15 | |
10 | |
4 |
User | Count |
---|---|
73 | |
56 | |
17 | |
11 | |
7 |