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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Chapin4u
Employee
Employee

In average how many rows repeat

Hi, I need help with the following:

 

Have numeric column named Bid#. Each Bid# can be repeated n times.

 

  • Need as a measure to know on average there are in Bid# column
  • Need the measure to know the max of rows a Bid# has

Many tks for the help.

2 ACCEPTED SOLUTIONS

Thk Greg for the tip. i did the following and it worked.

averagex bid =
AVERAGEX (
ADDCOLUMNS ( SUMMARIZE ( Datos, Datos[Bid #] ), "Promedio", [Count Bid#] ),
[Promedio]
)

View solution in original post

Hi @Chapin4u,

 

You may not need the ADDCOLUMNS() function.  Try this

 

=AVERAGEX(VALUES(Datos[Bid #]),COUNT(Bid #))

 

or 

 

=AVERAGEX(SUMMARIZE(VALUES(Datos[Bid #]),[Bid #],"Promedio",COUNT(Bid #)),[Promedio])

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

Check out SUMMARIZE coupled with AVERAGEX or other "X" functions. Alternatively, check out GROUPBY with the "X" functions. Sample data and such would be helpful. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Thk Greg for the tip. i did the following and it worked.

averagex bid =
AVERAGEX (
ADDCOLUMNS ( SUMMARIZE ( Datos, Datos[Bid #] ), "Promedio", [Count Bid#] ),
[Promedio]
)

Hi @Chapin4u,

 

You may not need the ADDCOLUMNS() function.  Try this

 

=AVERAGEX(VALUES(Datos[Bid #]),COUNT(Bid #))

 

or 

 

=AVERAGEX(SUMMARIZE(VALUES(Datos[Bid #]),[Bid #],"Promedio",COUNT(Bid #)),[Promedio])

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.