Forum Discussion

smpa01's avatar
smpa01
Community Champion
5 years ago
Solved

Top 5 Bottom 5 measure does not filter Map visuals (Map, Azure Map)?

Hi,

 

I have a measure to display top5 and bottom5 by variance on different cost sub category. I am using this measure as a visual level filter and it is doing its job to display top and bottom 5 business units in a matrix viz.

 

I also want to show top and bottom 5 on a map viz but unfortunately the visual level filter on map is not doing it's job. Is this normal? top5('000s) is ranking measure that produces the top and bottom 5 together.

 

  • smpa01 maybe the way you calculated top/bottom 5 is based on the subcategory and when you are viewing it by lat/lng, it is not getting calculated as expected. If you just ignore map visual for now, just put the lat/lng in a table visual and filter on top/bottom 5, does it work? What values you are getting for these measures? You need to investigate it and fix your measure and I think that is the issue.

     

    Check my latest blog post Improve UX: Show Year in Legend When Using Time Intelligence Measures | PeryTUS IT Solutions  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

2 Replies

  • smpa01 maybe the way you calculated top/bottom 5 is based on the subcategory and when you are viewing it by lat/lng, it is not getting calculated as expected. If you just ignore map visual for now, just put the lat/lng in a table visual and filter on top/bottom 5, does it work? What values you are getting for these measures? You need to investigate it and fix your measure and I think that is the issue.

     

    Check my latest blog post Improve UX: Show Year in Legend When Using Time Intelligence Measures | PeryTUS IT Solutions  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

    • smpa01's avatar
      smpa01
      Community Champion

      parry2k  thanks for showing me the debugging step. Yes you are right. With BU Name, lat, long on a matrix the measure fails

       

      The following is my measure which does not filter the map but the previous matrix.

      Budget Variance ('000s) := [Budget ('000s)]-[Actual ('000s)]
      
      BU Decimal := CALCULATE(MAX(BU[BU]))/100000000000
      
      Ranking TOP5 ('000s) := RANKX(ALLSELECTED(BU[Property_Name]),[Budget Variance ('000s)]+[BU Decimal],,DESC)
      
      Ranking Bottom5 ('000s) := RANKX(ALLSELECTED(BU[Property_Name]),[Budget Variance ('000s)]+[BU Decimal],,ASC)
      
      top 5 ('000s) := IF([Ranking TOP5 ('000s)]<6||[Ranking Bottom5 ('000s)]<6,1,0)

       

      Is there any way to write a single measure that would work on both the viz

      or

      I need to transalate the existing ranking measure with lat and long to filter the map viz.