Forum Discussion

Rene83's avatar
Rene83
Frequent Visitor
4 years ago
Solved

Containsstring and filter other tables

Hello Experts, I have a reporting table where the topics are stored in the respective column separated by a semicolon.   Table_Reporting           Product Admin Business Product1...
  • v-xiaotang's avatar
    v-xiaotang
    4 years ago

    Hi Rene83 

    Thanks for your reply.

    >>If I click on the colour green in the table with the colours, then the respective entries should be filtered in the table Iphone and Status.

    To get the above results, the method I mentioned earlier (changing the structure of the table) is the easiest way. Of course, the another way is to use visual level filter, but this will be a bit more complicated. 

    Let's take the scenario you're talking about as an example. When you click on green then the respective entries should be filtered in the table Iphone and Status,

    (1) create the measures,

    selected1 = IF( ISBLANK( SELECTEDVALUE(Colour[Title])),"",SELECTEDVALUE(Colour[Title]))

    to get the value selected in color table.

    (2) Put the following filter measures into their respective visual filter panes

    filter2 = 
    var _iphone= FILTER(Reporting, CONTAINSSTRING( Reporting[Iphone],MIN(Iphone[Title])))
    var _color=FILTER(Reporting,CONTAINSSTRING(Reporting[Colour],[selected1]))
    var _table=INTERSECT(_iphone,_color)
    var _count= CALCULATE( COUNTROWS(Reporting),  INTERSECT(_iphone,_color))
    return _count
    filter3 = 
    var _color=FILTER(Reporting,CONTAINSSTRING(Reporting[Colour],[selected1]))
    var _status=FILTER(Reporting, CONTAINSSTRING( Reporting[Status],MIN('Status'[Title])))
    var _count= CALCULATE( COUNTROWS(Reporting),  INTERSECT(_color,_status))
    return _count

    result

     

    Best Regards,

    Community Support Team _Tang

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