Forum Discussion

makul's avatar
makul
Regular Visitor
7 years ago

Filtering with measure doesn't work

I have a table with feature, and hash as columns

--------------------

| Category | Hash |  

|-----------|-------|

|      A        |    12  |

|      B        |    14  | 

 

So I When I select multiple entries, I want the hash to be multiplied. So I created a slicer out of it and doing this by a measure:

 

Selected = 
INT(IF(NOT(ISFILTERED(CategoryHash[Category])),
    0, 
    PRODUCTX(
        ALLSELECTED(CategoryHash), 
        CategoryHash[Hash]
        )))

Which works, once I get this captured in `Selected` I want to filter a table recommendation

 

recommendation

--------------------

| Category | Hash  |  

|-----------|--------|

|      A,B     |    168 |

|      B        |    14   | 

So I do this:

 

Table 2 = FILTER(recommendation, recommendation[Hash] = CategoryHash[Selected])

But it doesn't work. When I select the two rows A, and B, I get the hash which is 168 but the filter doesn't work and none of the rows from recommendation are selected. Any advice on this is appreciated

4 Replies

  • Stachu's avatar
    Stachu
    Community Champion

    calculated table will never be affected by a slicer, same with calculated column
    you could create a temporary table that can be used within a measure that would be affected by slicers - how do you want to use the reccomendation table?

    • makul's avatar
      makul
      Regular Visitor
      I'm trying to update a bunch of graphs using the recommendation table. It has more columns like failure rate etc.

      What I want to acheive is: user selects what combinations he's intrested in from the slicer. Then I calculate the hash by multiplying individual hashes, and then there'll be a corresponding entry in the recommendations table for that hash which I want to use to plot.
    • makul's avatar
      makul
      Regular Visitor

      How do I create a temporary table? I tried doing

      recommendation copy = recommendation

      But it has the same issues

  • v-danhe-msft's avatar
    v-danhe-msft
    Microsoft Employee

    Hi makul,

    Based on my research, dynamic calculate table or dynamic calculate column are not supported by DAX currently, I suggest you use your measure in a table visual to show your filtered data.

     

    Regards,

    Daniel He