Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

How can I find connected values?

Hi,

 

I have a bit of a difficult question: In our company, we operate a booking business, where each customer is registered as a "user". These users all have a distinct user id. For bookings, we have a "booking id" each time a user books an hours. 

 

What I want to find out is how many bookings we have per user. Can someone help me figure out a "good" way to do this. Both the "Bookings ID" column and "User ID" column is in the same table. So I am trying to figure out how many bookings we have per user ID (so the average of this, which I can build later by using visualizations). 

 

Can someone assist me with writing a smart expression or method to "connect" bookings id and user id, in order to see how many bookings id there is per user id? 

 

Really hoping someone can help as I am not sure how I would do this in Power BI

 

Thanks

  • Hi Anonymous,

     

    Check details as below:

    Create a measure as below:

    Measure = COUNT('Table'[Booking Id])

    And you will see:

    For the related .pbix file,pls see attached.

     

    Best Regards,
    Kelly

    Did I answer your question? Mark my post as a solution!

     

3 Replies

  • PaulDBrown's avatar
    PaulDBrown
    Community Champion

    Create a measure:

    bookings = COUNT ( Table [booking ID])

    and then create a visual using the field user id and the measure

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi and thank you for the follow up and quick response. 

       

      I am not quite sure still - what type of visualization and what do you mean by "field user id"?

       

      Thank you again!

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

        Hi Anonymous,

         

        Check details as below:

        Create a measure as below:

        Measure = COUNT('Table'[Booking Id])

        And you will see:

        For the related .pbix file,pls see attached.

         

        Best Regards,
        Kelly

        Did I answer your question? Mark my post as a solution!