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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
eramirez
Frequent Visitor

Custom Data Connector - Filter Selector

Hi,

 

I'm building a Custom Data Connector for Power BI, and I want to have two selectors and one to be affected for the first selection, like Select Country and then City.

 

Right now I have a restul service that when I send a country it returns all the cities from that country, How can I achieve calling the service with an on change or some event of the selector.

 

Here is my code where I Create the selectors:

 

 

//Set AllowedValues on each parameter
AddAllowedValues =
let
    AvailableCountries = getDataFromUrl,
    AvailableCities = {},
    CountryParamType = type text 
                      meta [Documentation.AllowedValues = AvailableCountries],
    CityParamType = type text 
                      meta [Documentation.AllowedValues = AvailableCities],
    NewFunctionType = type function (
                       Select as CountryParamType,
                       Select2 as CityParamType2) 
                       as table,
    CastToType = Value.ReplaceType(BaseFunction, NewFunctionType)
in
    CastToType
 
in
    AddAllowedValues;

 

I hope you can help me

 

Regards

 

1 REPLY 1
KumarDarmesh
Helper IV
Helper IV

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.