Forum Discussion

vaishali12's avatar
vaishali12
Frequent Visitor
7 years ago
Solved

Filtering with Dax

Hi, 

 

I have one table with countries and region.  I would like to select a country and have a table that returns all the countries in the same region as the selected country.  I currently only have a slicer to be able to select a country. 

 

Sample country Table: 

RegionCountry
EuropeGermany
EuropeFrance
EuropeNetherlands
EuropeItaly
AsiaIndia
AsiaChina
Latin AmericaVenezuela
Latin AmericaUruguay

 

Expected output: 

Selected country - Germany

 

RegionCountry
EuropeGermany
EuropeFrance
EuropeNetherlands
EuropeItaly
  • Hi vaishali12 

    In SSAS Live mode, it is impossible to create a measure to achieve your goal.

     

    I make a test as below.

    Create two slicers,

    Edit their interactions as below:

     

    Best Regards
    Maggie

     

    Community Support Team _ Maggie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 Replies

  • v-juanli-msft's avatar
    v-juanli-msft
    Community Support

    Hi vaishali12 

    Create another table

    Table = SUMMARIZE(Table1,Table1[Country],Table1[Region])

    In Table1,

    Create measures

    Measure = SELECTEDVALUE('Table'[Region])
    
    Measure 2 = IF(MAX(Table1[Region])=[Measure],1,0)

    Best Regards
    Maggie

     

    Community Support Team _ Maggie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • vaishali12's avatar
      vaishali12
      Frequent Visitor

      Hi v-juanli-msft , 

       

      Thank you for the response. I attempted your solution, but it does not work in my case. 

       

      I am using a SSAS connection and do not have the option to create new calculated tables. This is what my Modelling tab looks like. 

       

       

      Do you know if there is an option to do the same with just using measures? Thanks!

       

  • v-juanli-msft's avatar
    v-juanli-msft
    Community Support

    Hi vaishali12 

    In SSAS Live mode, it is impossible to create a measure to achieve your goal.

     

    I make a test as below.

    Create two slicers,

    Edit their interactions as below:

     

    Best Regards
    Maggie

     

    Community Support Team _ Maggie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.