Forum Discussion

Pal03's avatar
Pal03
Frequent Visitor
8 years ago
Solved

Duplicate values in slicer Please help

hello all ,

i have a table and a slicer with that table. The slicer for account doesnt show unique values and its repeating itself 

 

I dont have any spaces and the data is clean. I have sorted by date column thats when the Account starts repeating itself. When I sort by account I see only unique values. Please advise how to get distinct values in Slicer for account when I have it sorted by date.

 

  • Hi Pal03,

     

    You can new a calculated table to list unique account values:

    account = VALUES(TestData[Account]) 

    Create a one to many relationship from 'account' to 'TestData' based on [Account] field. Add 'account'[Account] into slicer, to filter data table.

     

    Regards,

    Yuliana Gu

6 Replies

  • Pal03's avatar
    Pal03
    Frequent Visitor

    it is something to do with sort in the modeling ribbon the way we have sorted our columns, Not sure how I fixed it . not sure if its a bug or what 

    • colorful's avatar
      colorful
      Regular Visitor

      I sorted the suspect column by itself, and the issue went away

  • VoHoPBI's avatar
    VoHoPBI
    Regular Visitor

    I had the same issue. Root cause was that I had the column "Grp" with duplicated entries sorted by a "Sortorder" Column.
    Usually you cannot sort a column with duplicated entries by another column, that has distinct values for this duplicated entry.
    But I changed the Values in Sortorder after "Sort By", so my table looked like this:
    The distinct values in Sortorder seem to force the Slicer to show each duplicated values in Grp

    Grp                Line                 Sortorder

    Discounts      Rebates           1  

    Discounts      Sales Disc        2

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi Pal03,

     

    You can new a calculated table to list unique account values:

    account = VALUES(TestData[Account]) 

    Create a one to many relationship from 'account' to 'TestData' based on [Account] field. Add 'account'[Account] into slicer, to filter data table.

     

    Regards,

    Yuliana Gu

    • BIBen's avatar
      BIBen
      Icon for Helper I rankHelper I

      v-yulgu-msft ,

      Doing as you suggest produces a circular dependency error:

      Has this functionality been depricated?

  • I had the same problem and i was able to solve it by a simple copy of the [Account] Column to a new column and that fixed my problem.