Forum Discussion

ivanmezev's avatar
ivanmezev
Frequent Visitor
2 years ago
Solved

bidirectional filtering not working

I have a fact table and dim_games table connected through game_id in bidirectional relationship. I have game_name as a filter for all pages coming from the dim_games table. I want to see only those g...
  • Dezmond95's avatar
    2 years ago

    I'm assuming you have a situation where you have 3 games with sales (A, C, and E) and 2 with no sales (B and D) but if you add the Dim_Games table Game Name to the filter panel, you are seeing all games like in the first when you only want it to show A,C, and E like in the second image.

     

     

    If this is the goal where you can only see those with sales in the filter panel (plus blank for some reason), I used a helper table.

     

    The helper table is made using this dax code. It basically filters the Dim_Games table and only displays the Game_Name with sales greater than 0 (sales = sum(fact_table[sales]) and the Game ID.

     

     

    This is so we can create a 1:* (1 to many) relationship from this new table to the fact table using the Game ID column. I also tested that it would add new game names if B suddenly had sales, it also showed up in the helper table during refresh.

     

    Im hoping this helps.