Forum Discussion

darcee's avatar
darcee
New Member
2 years ago
Solved

Filtering Map Visual based on info in a table visual which is filtered using the top N filter

  • Well... I continued playing around, and of course right after posting for help (having spent a good 30 minutes seeking a solution) I figured out a solution! ğŸ˜‚

    I just had to filter the "market" field int he map visual by top N just like I did the table... so obvious now!

     

2 Replies

  • For some reason I am unable to edit the body in the post, so I'll add details here...

     

    I'm working on a repoort which contains a dimension table of markets (countries) and a fact table with sales information. I have a table visual with countries filtered by top 5 using the Top N filter function. There are also fiscal year filters on the page. I'm trying to create a map visual that responds dynamically to highlight the top 5 countries based on fiscal year selection (as the table does). 

     

    I tried creating a measure to use as a filter for the map, such as the below, but that's not working...

    Top5CountriesNetSalesDynamic =
    CALCULATE(
        [Net Sales],
        TOPN(
            5,
            ALL(dim_market[Market]),
            CALCULATE([Net Sales], fiscal_year[fiscal_year] = VALUES(fiscal_year[fy_desc])),
            DESC
        )
    )

     

     

    • darcee's avatar
      darcee
      New Member

      Well... I continued playing around, and of course right after posting for help (having spent a good 30 minutes seeking a solution) I figured out a solution! ğŸ˜‚

      I just had to filter the "market" field int he map visual by top N just like I did the table... so obvious now!