Highlighting found values

When working with large tables, it is often necessary to make their search easier. One of the ways to do this is by applying the option for conditional formatting, with which we can mark all rows in which a value corresponding to the given criteria was found. In the next “recipe” you will find out how to perform such task.

Belonging to a set

If we want to check, within the DAX statement, whether the element belongs to the given set we will use the operator IN and then, in the extension, in curly brackets, list the elements that belong to the set. In this way we can associate a filter within the CALCULATE function that specifies more than one value. A similar effect is achieved with the CONTAINSROW function.

Physical examination

Are you overweight? Weight gain is not just an aesthetic problem, it can be the cause of many diseases, so companies conduct an annual physical examination to check the health of their employees. In this example, you will learn how to calculate BMI (Body Mass Index), a coefficient that indicates whether you are below or above the optimal body weight, and how to use conditional formatting to mark those who have unfavorable BMI.

Testing a condition

Testing of the conditions is done so that, depending on its fulfillment, we will get different results. These can be some concrete values, but most often, depending on the fulfillment of conditions, we devise different formulas for calculating. It is possible to create multiple conditions (multi-branching) or as a condition to specify an index that determines which expression will be calculated. The following text will detail the logical functions for testing the conditions.