Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Distinct countx

Hello,

 

I need help with Dax formula using DistinctCount.

I 'd like to show the number of  distinct ressources for each day  and the average .

 

Here is a sample of my Dataset : 

 

 

 

I managed to do it for the amount of Work ( " Actes" , below ) , but it's not working when I try  to count distinct ressources 

 

 

 

 

Any tips ?

 

 

TIA   🙂

2 Replies

  • Anonymous 

    Not clear about the average here. Can you show the expected results based on the sample data you shared?


  • Anonymous's avatar
    Anonymous
    Not applicable

    Hello Fowmy   , thanks for your time 

     

    Here is the constant value i'd like to show

     

     

    I tried to use  DISTINCTCOUNT  with  SUMX  and/or  AVERAGEX,KEEPFILTERS(VALUES(DATA[Date]))

    but it's not working ...

     

    I guess I found a workaround by creating a summurized table ( then I don't need DISTINCTCOUNT  wich seems to be the source of my trouble ) but i'm still curious for a clean solution 😁