Forum Discussion

dharish20240911's avatar
dharish20240911
New Member
1 year ago
Solved

Filtering the drop slicers

Example : 

I have three dropdown slicers titled as : 
1)Region , 2) Country , 3) City
When user select "Asia" from 1st dropdown(Region) then dynamically only related options (Countries in Asia) should be shown in 2nd slicer(Country) as 
India
China
Japan
Nepal
and When user select one of the option as "India" in 2nd dropdown(Country) then dynamically only related options (Cities in India ) should be shown in 3rd slicer as city names
Delhi
Mumbai
Hyderabad
Chennai
Please advise me in this concern using DAX.

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi dharish20240911 

     

    Currently, the dax function can not recognize place names, and if you can't join the relationships, you can only manually add calculated columns, for example:

    Here's a sample able:

    Table3;

    Add a calculated column:

    Country =
    SWITCH (
        TRUE (),
        'Table3'[City] IN { "Delhi", "Mumbai", "Hyderabad", "Chennai" }, "India",
        'Table3'[City] = "Beijing", "China",
        'Table3'[City] = "London", "Europe",
        BLANK ()
    )
    

     

     

    Best Regards

    Zhengdong Xu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 Replies

  • Kaviraj11's avatar
    Kaviraj11
    Solution Sage

    Hi,

     

    Are all three fields coming from the same table or is there any relationship created between them from different tables?

  • They are different tables and have no relationships , they all are dimensinal tables connected with fact table. 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi dharish20240911 

     

    Currently, the dax function can not recognize place names, and if you can't join the relationships, you can only manually add calculated columns, for example:

    Here's a sample able:

    Table3;

    Add a calculated column:

    Country =
    SWITCH (
        TRUE (),
        'Table3'[City] IN { "Delhi", "Mumbai", "Hyderabad", "Chennai" }, "India",
        'Table3'[City] = "Beijing", "China",
        'Table3'[City] = "London", "Europe",
        BLANK ()
    )
    

     

     

    Best Regards

    Zhengdong Xu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.