Forum Discussion

1001's avatar
1001
Resolver II
3 years ago

Removing Blank from s Distinct function Table.

Hi Guys, I've created a table of distinct values from another table. However, I have a blank cell that's carried across. The blank cell is preventing me from creating a one to many relationship to the original MasterData table. It's coming up many to many.  How can I remove this blank cell so it will allow me a one to many connection?  The DAX below is what I have. Thanks. 

SubProduct Grp = DISTINCT(Masterdata[Sub Category])

4 Replies

  • SubProduct Grp = FILTER(DISTINCT(Masterdata[Sub Category]),[Sub Category]<>BLANK())
    • 1001's avatar
      1001
      Resolver II

      Hi Ahmedx, thanks for replying.

      I ended up, in the Query editor, referencing my main table, removing blank rows, removing duplicates, then deleting all other columns to create my new Lookup table. Then loaded that into the report. Everyhting works fine now. Cheers. 

  • Hey Try using this Dax formula

    SubProduct Grp = Distinct(Not(isblank(Masterdata[Sub Category])))