Forum Discussion

DTreg1's avatar
DTreg1
New Member
8 years ago

DAX Distinct String

I am trying to create a new table that returns distinct string from a data table. I created the new table, created a new column with TAGNO = DISTINCT(Table1[tag]) and nothing was returned. Where am I going wrong?

3 Replies

  • Abduvali's avatar
    Abduvali
    Skilled Sharer

    HI DTreg1,

     

    If you trying to get a column or table, say with unique Ref number or date then the easiest thing is in Edit query Mode:

    1.  Duplicate your table
    2. Remove columns you don't need
    3. Highlight desired column, right click and select remove duplicates

     

    This will leave you with just Distinct values in that column and you will have a table with all editable  functions unlike when you use DISTINCT (distinct creates a table but you have limited functionality on it)

     

     

    Regards

    Abduvali

     

     

  • CPasten's avatar
    CPasten
    Frequent Visitor

    Have you tried with CALCULATETABLE( DISTINCT(Table1[tag]) )

    🤔