Forum Discussion

jorgeaon's avatar
jorgeaon
Regular Visitor
3 years ago
Solved

Distinct Count with sum

Hi Guys!

 

I have a problem with distinctcount when use on table, in graphic work nice, but i need in table, i am using the following code:

 

Contar Distintos = SUMX( VALUES('Esc Braden - saebrade'[QTD]), DISTINCTCOUNT('Esc Braden - saebrade'[numatend]))

 

But return this 

I need the column to do the sum but it doesn't work, you guys can help me?

Thx

  • Hi, jorgeaon ;

    You could try it.

    Contar Distintos = SUMX( SUMMARIZE('Table',[NAME],"1", DISTINCTCOUNT('Table'[numatend])),[1])

    The final show:


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

1 Reply

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Community Support

    Hi, jorgeaon ;

    You could try it.

    Contar Distintos = SUMX( SUMMARIZE('Table',[NAME],"1", DISTINCTCOUNT('Table'[numatend])),[1])

    The final show:


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.