You are on page 1of 4

Dynamically change the number of Customers shown based on a Selection

Firstly need to create a table by entering data.

1. Click Enter Data


2. Name table ; Rank
3. Enter some data 3.5.10,15,20
Enter some data
4. Name the table : Ranking
Selection
5. Load to data model

Name the table


Load the data

Create a slicer with the Rank Table and add a Table for say Customers and
Total Sales. The idea is that with the slicer you can dynamically change how
many customers will appear in the visualisation. E.g. select 3 shows top 3
Customers or 15 shows Top 15 Customers based on Total Sales
To do this create a new measure ;

If you drag this measure onto the canvas it will return whatever the result is of
the Selection, but won’t do anything to the Total Sales Table yet. If nothing is
selected it will return the 50 (or the max number of customers)

To get the selection to do something on the Total Sales, firstly rank the
customers (largest to smallest) and then sort the rank column. The measure is
And if this measure is added to the Total Sales Table:

To bring the Rank Measure into the Total Sales Table, use this measure:

Adding Sales by Customers to the Total Sales and clean out intermediate steps.
Dynamic Labels with DAX.

You might also like