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
eRic_LaU
Frequent Visitor

How to interactive measure value with visualizations map

Greetings!

 

I'm new on PBI, and now creating a ratio table. 

I have a table with road travel speed, and would like to compare a section of road from different day (day 1 "Measure", day 2 "Comparison", and a measure "ratio" was created). After the ratio has been calculated I would like to plot into the visualizations map with colour displayed, for ratio > 0 then "Green" for ratio <0 then "Red"

 

The "Ratio" cannot directly use in the map, but when i put the "ratio" into the column, the value come out not exactly the compare of 2 days, it only calculate overall average of 1 day. The days was selected by using the slicer filter how can i interactive the result with the filter and the table? Thanks.

eRic_LaU_0-1697506092027.png

 

But I can't put the ratio to the Route Map - Colour Legend.

eRic_LaU_1-1697506250872.png

I want the colour display base on the ratio, if the ratio >=0 then it display "Green", otherwise "Red"

Looking for anyone can help, thanks a lot.

 

2 REPLIES 2
ChiragGarg2512
Solution Sage
Solution Sage

@eRic_LaU , create a measure using switch statement where if the condition fits its one color and doesn't another color.

Ex.

Color Scatter =
var _dis = CALCULATE([Discount %], ALLSELECTED())
var _mrg = CALCULATE([Margin %] , ALLSELECTED())
Return
Switch(True() ,
[Margin %]  > _mrg && [Discount %] <= _dis, "Green",
[Margin %]  > _mrg && [Discount %] > _dis, "Blue",
[Margin %]  <= _mrg && [Discount %] <= _dis, "Yellow",
[Margin %]  <= _mrg && [Discount %] > _dis, "Red")
 
Creating a measure in a format like this might help.

Thanks for your reply but the solution may not help.

 

I have a table with road travel speed, and would like to compare a section of road from different day (a measure "ratio" was created). After the ratio has been calculated I would like to plot into the visualizations map with colour displayed, for ratio > 0 then "Green" for ratio <0 then "Red"

 

But when i put the measure "ratio" into the column, the value come out not exactly the compare of 2 days, it only calculate overall average of 1 day. The days was selected by using the slicer filter how can i interactive the result with the filter and the table? Thanks.

 

 

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.