Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
There are several instructions on the internet on how to create a dynamic solution that shows only the first top N results and many of these also have the "Others" category.
This version shows both the slider and selection list options, so you can choose the one you need.
It is easiest if you first download the solution, so you can compare instructions against the solution.
Background: This graph shows how many sales each person on the sales team has made.
These solutions also have three extra features copied from elsewhere:
For Top N, you need to do the following:
Top X Steps =
VAR TopNumber = IF(HASONEVALUE('TopNSteps'[TopN]),VALUES('TopNSteps'[TopN]),8)
VAR Rest =
COUNTROWS ( 'Sales vSalesPerson' ) - TopNumber
RETURN
IF (
HASONEVALUE ( TopNUnion[Key Values] ),
CALCULATE (
[Sum of SalesYTD],
FILTER (
'Sales vSalesPerson',
[Business Entity ID] = VALUES ( TopNUnion[Key Values] )
&& CONTAINS (
TOPN (
TopNumber,
ADDCOLUMNS (
ALL ( TopNUnion[Key Values] ),
"SalesYTD", CALCULATE (
[Sum of SalesYTD],
FILTER ( 'Sales vSalesPerson', 'Sales vSalesPerson'[Business Entity ID] = EARLIER ( [Key Values] ))
)
),
[SalesYTD], DESC
),
TopNUnion[KeyValues], VALUES (TopNUnion[KeyValues])
)
)
)
)
Other Steps =
VAR TopNumber =
IF ( HASONEVALUE ( 'TopNSteps'[TopN] ), VALUES ( 'TopNSteps'[TopN] ), 7 )
VAR Rest =
COUNTROWS ( 'Sales vSalesPerson' ) - TopNumber
RETURN
IF (
HASONEVALUE ( TopNDaxUnion[Key Values] ),
IF (
VALUES ( TopNDaxUnion[Display Values] ) = "Others",
SUMX (
TOPN (
Rest,
ADDCOLUMNS (
VALUES ( 'Sales vSalesPerson'[Business Entity ID] ),
"SalesYTD", [Sum of SalesYTD]
),
[SalesYTD],ASC
),
[SalesYTD]
)
)
)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.