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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Average a column by another column

I am looking to create a column that calculates the average number of shipments per load. What DAX logic can i use to create this column? Any help would be greatly appreciated. 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @Anonymous,

So you mean to aggregate a column based on another column category? If that is the case, you can take a look at the following formula if it meets your requirement.

New Column =
CALCULATE (
    AVERAGE ( Table[Column1] ),
    FILTER ( Table, [Column2] = EARLIER ( Table[Column2] ) )
)

Regards,

Xiaoxin Sheng

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

HI @Anonymous,

So you mean to aggregate a column based on another column category? If that is the case, you can take a look at the following formula if it meets your requirement.

New Column =
CALCULATE (
    AVERAGE ( Table[Column1] ),
    FILTER ( Table, [Column2] = EARLIER ( Table[Column2] ) )
)

Regards,

Xiaoxin Sheng

selimovd
Super User
Super User

Hey @Anonymous ,

 

that should be possible with DAX.

Do you need it as a calculated column or as a measure?

 

If you provide some sample tables or a Power BI file I can try to solve that. The solution depends a lot on the relationships and your data.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors