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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anders_Dahl
Frequent Visitor

Get the average value per row with multiple columns

How to get the Average value with rows

As you can see in the table below. I want get the average value for each row.


I have tried so many things.

AVERAGEX(Table, Table[City 1]+Table[City 2]+Table[City 3])

But this give me the SUM.

I also would like to get median value as well.

ColorCity 1City 2City 3Avreage
Yellow2765
Blue10101010
Green12895752,66667


I hope the comunity can help me 🙂

1 ACCEPTED SOLUTION
ERD
Super User
Super User

@Anders_Dahl , do you have these cities as separate columns? I would unpivot them first, otherwise you'll have to define each value with SELECTEDVALUE, for example AVERAGEX(Table, SELECTEDVALUE ( Table[City 1] )+ ... ).

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

View solution in original post

4 REPLIES 4
ERD
Super User
Super User

@Anders_Dahl , do you have these cities as separate columns? I would unpivot them first, otherwise you'll have to define each value with SELECTEDVALUE, for example AVERAGEX(Table, SELECTEDVALUE ( Table[City 1] )+ ... ).

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

I did use the unpivot and then i used Averagex and filter togheter and it worked perfect.
Whit this i understand how work with the tables.
So thanx!

Anders_Dahl
Frequent Visitor

Hi @Nate123 

Yes i can, but i want this to be dynamic.

I want to know why this is acting like it does. I can use other DAX to get the average.

Nate123
New Member

Could you sum them and divide by 3? 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.