11.7Choosing the right denominator

Filter modifiers are often used to calculate shares, like the share of a city in the total, of a customer in their city or of a city in the selection. This lesson brings together what you have seen, and gives a method to choose the right modifier every time.

11.7.1The ratio you want dictates the denominator

A share divides two amounts. The numerator is the figure of the row of the visual, calculated with the filters of this row. The denominator is a reference total, which has to be calculated with other filters.

Without a modifier, both see exactly the same filters. Each row is divided by itself, and the result is 100% everywhere. The modifier is therefore placed, most often, in CALCULATE, around the denominator. The numerator does not change. If your visual shows 100% on every row, the Diagnostic guides you step by step.

It is the ratio you want that decides the denominator, and so what you give CALCULATE.

The ratio you want and what you give CALCULATE
The ratio you want and what you give CALCULATE
The ratio you wantThe denominatorWhat you give CALCULATE
The share of each city in the totalAll the citiesALL( Customers[City] )
The share of each city in the selection of the slicer, with 100% on the “Total” rowThe ticked citiesALLSELECTED( Customers[City] )
The share of each customer in their cityThe whole city of the customerALL( Customers[Name] )
Each city compared with New York, New York being 100%The figure of New YorkCustomers[City] = "New York"
The share of the companies in each cityThe figure of the city, with nothing changedKEEPFILTERS( Customers[Type] = "Company" ), this time in the numerator

In the last row, it is the numerator that changes. It keeps the filter of the city and adds the filter of the type to it.

The rest of this lesson is part of izyDAX Pro

You have just read the first section. The next 4, their animations, the exercises and the summary are waiting for you with izyDAX Pro, in a single payment.