Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Filled Map by regions by value

Hi, I am trying to create a filled map that color goes from darker blue to lighter blue depends on the regions' sales number, eg MD/PA/VA are Region1, ND/SD/MT are region2, region1 has higher sales n...
  • Thejeswar's avatar
    Thejeswar
    5 years ago

    Hi,

    Hope you are using Filled Map Visual. In such case, there is a option to conditionally format the colors in the map. You should be using the Sales Revenue measure to conditionally format the map visual. Color Scales or Divergent Colour ... you can choose as per your need

     

    PFB link the shows the step by step implementation of conditional formatting that would avoid setting the colors manually for all regions

     

    https://thewindata.com/power-bi-desktop-filled-maps-with-conditional-formatting/

     

    Hope this helps!!

    If this is what you are expecting, mark this as an answer!!!

     

  • AllisonKennedy's avatar
    AllisonKennedy
    5 years ago

    Anonymous  Please paste your sample data in table format in future as it makes it easier for us to build you a sample file like the one attached below signature.

     

    You need to build a DAX measure that calculates the Sales per region, and use that in your map formatting: 

     

    Sales All States Current Region =
    VAR _Region = SELECTEDVALUE(Sales[Region])
    RETURN
    CALCULATE(
    [Total Sales]
    , ALL(Sales[State]), Sales[Region] = _Region
    )