Forum Discussion

kevinedora's avatar
kevinedora
Helper I
4 years ago
Solved

DAX Average

Hello,

 

I have this data:

 

Event IDDate
1June 1 2020
1June 1 2020
2June 3 2020
2June 3 2020

 

I just need to average the distinct count of event ID. I also have the measure for the discount of the EventID it's just that I can't average the measure that I did.

 

Regards,

Kevin

  • Hi, kevinedora ,

    Try to create a measure.

    Aver = DIVIDE( DISTINCTCOUNT('Table'[Event ID]),DISTINCTCOUNT('Table'[Date]))

    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.

5 Replies

  • Hi kevinedora 

     

    Can you add more details because the "average the distinct count of event ID" is 1.

    You have 2 distinct value in the Event ID column, do you want to divide that by 2 or 4?

    Appreciate your Kudos!! 

    LinkedIn | Twitter | Blog | YouTube 




  • Sorry for the incomplete details. So my expected result should be 1 since there are 2 distinct values. But imagine I have multiple EventID in a day, I should be able to average the count of those distinct values.

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

    Hi, kevinedora ,

    Try to create a measure.

    Aver = DIVIDE( DISTINCTCOUNT('Table'[Event ID]),DISTINCTCOUNT('Table'[Date]))

    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.