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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
psathanapal
Frequent Visitor

trying to import SAP HANA Anonymous code block with input parameter to Power BI

Hello Team,

Iam trying to import SAP HANA Anonymous code block to Power BI. but facing issue

the code contains input parameter. can we handle the input parameter through power bi filter? (i need to control the input parameter with power BI filter selection(as of now i using slicer vizual for filter) - according to my below code if user select a product in power BI filter it should hit my input parameter placed in the Anonymous code block which i imported)

 

 IP_TOP_PRODUCT - input parameter

below is the code:

 

do (in IP_TOP_PRODUCT nvarchar(20) => 'PROD01624')
begin

select *
from "Schema"."Test_Table"
top_product = :IP_TOP_PRODUCT or L1_product = :IP_TOP_PRODUCT or L2_product = :IP_TOP_PRODUCT;

end;

 

psathanapal_0-1667826079881.png

facing below issue.

psathanapal_1-1667826122309.png

how can i conrol this parameter using the slicer filter as shown below

if user give a product as shown below, it shout hit my input parameter (which we used in anonymous code) and shoud get result accordingly.

need some help on this.

 

psathanapal_2-1667826822735.png

 

Thanks,

Prashanth.

 

 

 

 

1 REPLY 1
Gengar
Resolver I
Resolver I

Hi @psathanapal ,

 

Maybe this blog will help you.

https://blogs.perficient.com/2022/08/24/dynamic-data-source-in-power-bi/ 

This is a blog about parameter and dynamic data source.

 

Gengar

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.