Performance states can be defined in two ways: by binding measures or by manual setting.

Binding measures

In all the visuals that support performance states, you will find the following binding fields:

Note that creating calculated measures in Power BI Desktop is very simple – see here for more information. However, if you are worried about the confusion that new measures could bring to your users, consider that you can right-click on each of them in the Fields panel and choose Hide from their context-menu.

After the binding process, you will find that the States section of the visual property panel has several properties related to the measures themselves, using the same names.

Here, you can choose how the visual reacts to the state changes. In the above case, you can only choose the colors to assign to each state. Depending on the visual, there might be other options available for each state.

Note that in this case the Target is present at the bottom of the list, because it is checked for a last term of comparison (more on this later).

Using manual states

If you choose to not bind measures, you can still use states by setting them in the visual property panel. Our components come with 5 manual states you can play with.

The manual states are not visible whether there is any measure bound to the States field.

Setting States values

If you have bound a Target measure, you can define States as percentages or modifiers over the target itself, and not only by absolute values (which is the only option if you don’t bind the Target measure).

You can choose the preferred behavior using the Value type option.

The following configurations are all valid and describe an equivalent configuration using the three different settings for Value type:

Absolute value

MeasureTargetVarianceState 1State 2State 3State 4State 5
10,0007,00042,86%3,5007,50010,00015,00017,500

 
Percentage over Target*

MeasureTargetVarianceState 1State 2State 3State 4State 5
10,0007,00042,86%-0.50.07140.42861.14281.5
(*State values must be defined as decimals, e.g. 1.5 means 150%)

 
Modifier over Target

MeasureTargetVarianceState 1State 2State 3State 4State 5
10,0007,00042,86%3,5005003,0008,00010,500

Defining how Comparison works

After you define how the data is stored, you choose how the comparison works. To do that, you set the comparison operator in the Comparison field.

To determine the color to apply in the visual, the State Measure (or the Measure if the former is not available) is compared to each state, from the first to the last one, using the selected comparison operator.

Note that the comparison operator control the evaluation order of the states defined by measures, resorting them before the comparison takes place, unless you use the “=” operator or you use manual states (in both cases, the expressions are evaluated in order of binding/definition). The first match found following the evaluation order defines the resulting state.

From hereinafter, you can see several examples to clarify how the rules work. Consider the following measures and their corresponding value.

ValuationExcellentGoodJust okayPoorTerrible
597553

In conclusion

States are very powerful tools to convey information, but there are many possible scenarios and covering all of them is not that simple.

In our custom visuals, we tried to manage most of the possible requirements, making it possible to create complex configuration if needed.

Do you want to see our performance states in action? Download Synoptic Panel and Card with States, both by OKVIZ.

 

Have you some questions? Leave your comments below.