Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
bonjourposte
Advocate II
Advocate II

Making points on a map a third colour that isn't in my data

I have a Bing map I use to mark buildings that need inspection.  This colum comes from SQL- "first inspection" or "second inspection" and the ones that need inspection this year are filtered to show up on the map.  So naturally in the map, when I put "Inspection number" into the "colour" field well, the map generates two colours- red for first inspection and blue for second inspection.  Now the inspectors are asking that I make a third colour- green, let's say.  Green dots will tell the inspectors that despite it being a first or second inspection, the maturity date is coming up and maybe it's not worth it to go see that inspection.  How would I do that?

 

Thanks, all.

2 REPLIES 2
TheoC
Super User
Super User

Hi @bonjourposte 

 

If I understand correctly, you should be able to add a third category by creating a calculated column and using SWITCH ( TRUE() ) or something similar to create an updated Inspection Status column:

Inspection Status = 

VAR _days = 30 // Adjust this to whatever the logic is you want to use for near maturity days 
VAR _result = 

SWITCH (
    TRUE () ,
        AND ( 
            YourMaturityDateColumn <= TODAY() + _days , YourInspectionColumn = "First Inspection" ) , "Maybe Not Worth It",
        AND ( YourMaturityDateColumn <= TODAY() + _days , YourInspectionColumn = "Second Inspection" ) , "Maybe Not Worth It" ,
    YourInspectionColumn
)

 

Please make sure to adjust the formula to your table / column name conventions etc. 

 

Hope this helps!

 

Theo

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Oh my gosh, thank-you so much, but now I feel so bad because I took a different route and just decided to use slicers to show which properties are within the last six-month stretch before maturity.  But now I have a different problem and may come back to this solution tomorrow.  

 

Thanks again.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.