Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago

Bind dynamic status to map visual

Hello, Power BI forum! Here's an interesting question for everyone.

 

I have a map visual that shows a number of sites scheduled for constuction projects. Each of these sites has a start date and a completion date. Each site will therefore have a status of either "Not started", "On site" or "Completed".

 

I would like the colour of the pin to reflect the different statuses, e.g. grey for not started, etc.

 

So far, it's straightforward, HOWEVER... my customer's requirement is to be able to use a date slicer to select any date on the programme, and have the map update to show which sites are "not started", "on site" and "completed" as per the selected date. This means that the colour of the pin needs to change dynamically based on the date selected using the slicer.

 

This has got me stumped! I can create a calculated measure which will reference the date field and return the correct status label, but this calculated measure cannot be bound to the 'legend' of the map visual. AFAIK only fields (columns) can be bound to the 'legend', and the contents of a column cannot be changed dynamically by filter context.

 

So - what's the best way to tackle this? I'm very keen to see what people come up with!

4 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      This is not a solution. 'Status' is a text field, it cannot be applied to colour saturation.

       

      We also want the status to appear alongside the property name in a table. This is actually more troublesome because the expression needs to evaluate property ID with row context (i.e. what is the start date and end date associated with this row?).

       

      I don't think it can be done, but I'm eager to be proven wrong.

      • v-chuncz-msft's avatar
        v-chuncz-msft
        Community Support

        Anonymous,

         

        You may just add another measure that returns -1, 0 and 1, drag your original measure to Tooltips.