Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Dividing two distinct count values

Dear PowerBI Pro's

 

I'm working on a performance analysis of our clients.

One of the things i would like to know is how many actions clients do in the system over a period of time.

Unfortunately i'm a noob, could you help me out?

 

Currently i have used two values:

 

Clients

no. of clients = DISTINCTCOUNT(Sheet0[contextname])

Which gives me the total of active users

 

No. of actions

no.of actions = DISTINCTCOUNT(Sheet0[Index])
Which gives me the total no. of actions based upon the distinctcount of every unique indexnumber of each row in my table
 
I would like to divide the clients / no. of actions to calculate the no. of actions per client within a certain timeframe.

Is there a way to do it through a measure?
 
 
 

 

  • AilleryO's avatar
    AilleryO
    6 years ago

    Hi Anonymous ,

     

    You're welcome, and we all need to start one day 😉

    Do not forget to mark it as solved and have a nice day,

     

4 Replies

  • AilleryO's avatar
    AilleryO
    Memorable Member

    Hi,

     

    Maybe I have a bad understanding of your model, but it seems you've done the job already...

     

    If you create a mesaure  :

     

    MyMeasure = DIVIDE(No_actions;No_client)

     

    It should be ok ? Isn't it ?

    DIVIDE is better than the sign /, because it handles errors. 

    Hope it helps

    • AilleryO's avatar
      AilleryO
      Memorable Member

      And for you time frame,

       if you build a matrix with proper time dimension in comlumns you should have all desired results.

       

      If you need a fixed period of time, then you ll have to use FILTER, or DATESINPERIOD...

       

      But we need to know more about your model/datas...

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi AilleryO 

       

      Your completely right. Told you I was a noob ;).

       

      Thanks!

      • AilleryO's avatar
        AilleryO
        Memorable Member

        Hi Anonymous ,

         

        You're welcome, and we all need to start one day 😉

        Do not forget to mark it as solved and have a nice day,