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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
nicktayl
Helper I
Helper I

Dynamic Map Color Saturation Based on Toggle

Hi,

 

I have a map with which I've plotted home addresses. I for color saturation, the column I am using is "% Construction Complete". For homes that are closer to completion, the color is green, and for homes that are farther from completion the color is red. I would now like to add additional functionality so that the user can toggle the column that the color is based on between "% Construction Complete" and "> 90 Days Since Last Inspection Date". The new column is a TRUE/FALSE flag and I want the plotted addresses to show as red if the last inspection for that property is greater than 90 days ago. 

 

I've tried to create a standalone table for the toggle items: "Days Since Last Inspection" and "Percent Complete", and next, both a column and a measure (separately) which try to return the % complete if the filter is "Percent Complete" and 1 or 0 if the "Days Since Last Inspection" flag is TRUE/FALSE. I get aggregation errors. I'm not sure what to try next.

 

Thank you,
Nick

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@nicktayl,

 

You may refer to the following DAX that adds a measure.

Color Saturation =
VAR itemValue =
    IF ( HASONEVALUE ( Table2[item] ), VALUES ( Table2[item] ) )
RETURN
    SWITCH (
        itemValue,
        "Days Since Last Inspection", MAX ( Table1[> 90 Days Since Last Inspection Date] ),
        "Percent Complete", MAX ( Table1[% Construction Complete] )
    )

 

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-chuncz-msft
Community Support
Community Support

@nicktayl,

 

You may refer to the following DAX that adds a measure.

Color Saturation =
VAR itemValue =
    IF ( HASONEVALUE ( Table2[item] ), VALUES ( Table2[item] ) )
RETURN
    SWITCH (
        itemValue,
        "Days Since Last Inspection", MAX ( Table1[> 90 Days Since Last Inspection Date] ),
        "Percent Complete", MAX ( Table1[% Construction Complete] )
    )

 

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.