Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

FInding average amount

Hi,

 

Can someone help me with this: 

 

I have two columns: User ID and Bookings ID. The rows in these columns contains numeric values showing the respective user id and id booking, I want to find the average number of bookings per user id. 

 

How could I go about this in Power BI? I do not want to see the total amount of bookings per user id, but the average. 

When applying the AVERAGE aggregate in the visual, or creating a measure, the output is totally wrong, probably because all of the booking id are in the thousands and the average of all these numbers would be high. Also, this is not really the correct approach since I want to the see how many bookings a user makes on average. 

 

Can someone help?

1 ACCEPTED SOLUTION
v-angzheng-msft
Community Support
Community Support

Hi, @Anonymous 

You can try to filter out the faulty ID after the calculation, or add the IF judgment condition or the Filter function filter table in the measure.
something like :IF (user_id ="101", null, Avragex() )  or  Calculate( Averagex(), Filter('table', user_id <>"101") )

 

Or please consdier sharing a simple sample file without any sesentive information for further discussion,  then I can try to look into it to come up with a more accurate measure.

 

 

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

 

 

 

View solution in original post

3 REPLIES 3
v-angzheng-msft
Community Support
Community Support

Hi, @Anonymous 

You can try to filter out the faulty ID after the calculation, or add the IF judgment condition or the Filter function filter table in the measure.
something like :IF (user_id ="101", null, Avragex() )  or  Calculate( Averagex(), Filter('table', user_id <>"101") )

 

Or please consdier sharing a simple sample file without any sesentive information for further discussion,  then I can try to look into it to come up with a more accurate measure.

 

 

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

 

 

 

amitchandak
Super User
Super User

@Anonymous , Try to create a measure like

 

averageX(values(Table[User_id]), calculate(count(Table[Booking_id])))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi and thank you!

 

Is there any way writing that measure while excluding a certain user id? I do not want to count the value of "110" in my calculation (this is a faulty ID". How would I incorporate this?

 

Thank you for your assistance!

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.