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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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