Forum Discussion
SR1
8 years agoHelper I
Include duplicates in slicer
I have a slicer that shows students name & the slicer removes duplicate names even if the students have different student ids. Here is my table: StudentId StudentName 1 Ann 2 Bob 3 ...
ribisht17
4 years agoSuper User
I was able to do it with some conditions,
Also, I understand that for the HR dashboard people tend to remember by names rather than ID and hence this requirement came to us as well because the end-user did not want to have IDs in the Slicer
Step 1
Rank Names C = RANKX( FILTER(ALL(Sheet6),Sheet6[Name]=EARLIER(Sheet6[Name])),Sheet6[ID],,ASC)
/////Group the same names and Rank wrt ID no.
Step 2
Insert . C New = IF((Sheet6[Rank Names C])=2," ",IF((Sheet6[Rank Names C])=3," ",""))
///Insert Spaces to each rank, as per our experience we are assuming that there can be a maximum 3 exactly matching names but we can extend this to 5 or 10 whatever we want, but we don't recommend if there are too many common names say more than 10
Step 3
FINAL NAME to be used in the Slicer
Final Name C = COMBINEVALUES(" ",(Sheet6[Name]),Sheet6[Insert . C New])
We can also use a similar approach to get the names as A_1,A_2,A_3.
Remember 1,2 and 3 here shows the 1st copy,2nd copy and 3rd copy , I am not taking about Student ID here,
If we want this approach then the Final Step 3 will be like
Final Name Number Approach = COMBINEVALUES(" ",(Sheet6[Name]),Sheet6[Rank Names C])
Actually, the second approach seems to be better since it shows the duplicate numbers as well without any limitations
Regards,
Ritesh
Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users
My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users