Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi All,
I have a waterfall chart written in R using ggplot2 package. And I am using the R visual present in Power BI. Everything works fine as long as I have data for the selected filter condition. However when I select a value in the slicer , it gives error when there is no data corresponding to the slicer selected. How do we get rid of this error. I want to show custom message like "Selected Filter does not have any data" . Is there any way to do that ?. Attached error code.
Regrads,
Akash
Solved! Go to Solution.
I was able to resolve this with if else statement. Basically when the dataframe returns 0 record, it gives error. So I have handled this with if else.
Is dataframe returns 0 then show blank plot else do the actual calcualtion.
Regards,
Akash
@akj2784,
Glad to hear that the issue is solved, you can accept your reply as answer to close this thread.
Regards,
Lydia
I was able to resolve this with if else statement. Basically when the dataframe returns 0 record, it gives error. So I have handled this with if else.
Is dataframe returns 0 then show blank plot else do the actual calcualtion.
Regards,
Akash
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.