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
CLCastroEn
Helper IV
Helper IV

how to average 4 columns

Hello everyone!

I am making a report, in which I have 4 columns of forecasts (week 40, 41,42,43) and I must create a new column with DAX that allows to average these 4 columns.

The result is that the new column each row that has been the average of the previous ones.

Stay tuned! Thanks a lot

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

Hi @CLCastroEn ,

 

First create an index column,then select the 4 week columns>unpivot;

Then create a matrix,right click on the value field>average:

v-kelly-msft_0-1606282915866.png

And you will see:

v-kelly-msft_1-1606282941758.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

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

 

View solution in original post

3 REPLIES 3
v-kelly-msft
Community Support
Community Support

Hi @CLCastroEn ,

 

First create an index column,then select the 4 week columns>unpivot;

Then create a matrix,right click on the value field>average:

v-kelly-msft_0-1606282915866.png

And you will see:

v-kelly-msft_1-1606282941758.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

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

 

mahoneypat
Employee
Employee

You should unpivot your week columns in the query editor.  It will simplify your analysis. If you provide example starting data and desired output, a specific expression can be suggested.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Pragati11
Super User
Super User

Hi @CLCastroEn ,

 

Can you share some sample data around your problem and what the expected output please?

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

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.