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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
whu
New Member

How to get a parameter in a slicer?

Hi,

I've created a parameter in my Direct Query Dashboard, which can be used as input in "Data source settings" for the server name (see picture below). This works fine; within the Power Query Editor I can choose from a list of servers (from the parameter) and the Dashboard is updated directly with the corresponding data.

However... I need to publish this Dashboard (Direct Query), and I want to have a slicer in which users themselves can choose with which server the connection is made. The question is, how to get this parameter in a slicer, or, when this isn't possible, how can this be bypassed so the user still can choose the server?

SERVER_PBI.jpg

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

HI @whu,

For the parameterized report, you need to enter to data source setting to change the parameters then it can affect the data connections:

Using the Power BI Service Parameters to change connection strings (To possibly change between Dev 

For your scenario, I'd like to suggest you take a look at the following link about preview feature dynamic M query parameters. 

Dynamic M query parameters in Power BI Desktop (preview) - Power BI | Microsoft Docs

Notice: current this feature does not work for direct query mode data source, please use the import mode table instead.

Spoiler

The feature is only supported for M based data sources. The following DirectQuery sources are not supported:

T-SQL based data sources: SQL Server, Azure SQL Database, Synapse SQL pools (such as Azure Synapse Analytics (formerly SQL Data Warehouse)), and Synapse SQL OnDemand pools
Live connect data sources: Azure Analysis Services, SQL Server Analysis Services, Power BI Datasets
Other unsupported data sources: Oracle, Teradata, and Relational SAP Hana, PostgreSQL
Partially supported through XMLA / TOM endpoint programmability: SAP BW and SAP Hana

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

HI @whu,

For the parameterized report, you need to enter to data source setting to change the parameters then it can affect the data connections:

Using the Power BI Service Parameters to change connection strings (To possibly change between Dev 

For your scenario, I'd like to suggest you take a look at the following link about preview feature dynamic M query parameters. 

Dynamic M query parameters in Power BI Desktop (preview) - Power BI | Microsoft Docs

Notice: current this feature does not work for direct query mode data source, please use the import mode table instead.

Spoiler

The feature is only supported for M based data sources. The following DirectQuery sources are not supported:

T-SQL based data sources: SQL Server, Azure SQL Database, Synapse SQL pools (such as Azure Synapse Analytics (formerly SQL Data Warehouse)), and Synapse SQL OnDemand pools
Live connect data sources: Azure Analysis Services, SQL Server Analysis Services, Power BI Datasets
Other unsupported data sources: Oracle, Teradata, and Relational SAP Hana, PostgreSQL
Partially supported through XMLA / TOM endpoint programmability: SAP BW and SAP Hana

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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