Forum Discussion
Top N and Others
Good Afternoon,
I followed a couple of guides on here and got My Top N working Perfectly but my "others" doesnt seem to filter correctly.
It doesnt change when i change the Slicer and doesnt change with Filters applied to the page below is my "others" measure.
Top N filter - is a table of 5/6 options i.e 5,10,20
Other =
Var TopNumber =
if(HASONEVALUE('TopN Filter'[TopN]),values('TopN Filter'[TopN]),10)
var Rest =
countrows(CLAIM) - TopNumber
return
if(
HASONEVALUE(SourceName[Source_Information.Source ID]),
if(
VALUES( SourceName[Source_Information.Source ID]) = "others",
SUMX(
TOPN(
Rest,
ADDCOLUMNS(
VALUES( CLAIM[Source_Information.Source ID]),
"Measure",count(CLAIM[Ref])
),
[Measure],ASC
),
[Measure]
)
)
)
I also couldnt work out how to add them as "ledgends" on a line graph so top 10 then others as 11 lines, so i added as two charts one "top N" which fitlers and works perfect then another a "others" but this seems to eb a fixed number with no page/visual filters or the "top N filter" slicer changing it
1 Reply
- MFelix
Super User
Hi sovereignauto ,
Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.
If the information is sensitive please share it trough private message.