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
AllanBerces
Post Prodigy
Post Prodigy

Average of Two and Three Column

Hi Good day,

Pls need assistance on how can i have the Overall output on my table base from average.

a. If the Fab column is 0 it will average by 3 three column (JC, Fab and Mat).

b. if the Fab column is Blank it will average by two column (JC and Mat).

 

AllanBerces_0-1717241185060.png

Thank you

1 ACCEPTED SOLUTION
Anonymous
Not applicable

6 REPLIES 6
Anonymous
Not applicable

@AllanBerces  This works.

bchager6_0-1717243735799.png

 

 

Hi @Anonymous  thank you, working perfectly.

DataNinja777
Super User
Super User

Hi @AllanBerces 

In addition to the anwer provided by @Ritaf1983 , I'd like to present you another way as there are multiple ways to achive your required output.  One way is convert your pivoted table to a long unpivoted table using Power Query's unpivot other column function which will supress blank rows as a default, and then you can write an averagex dax measure as shown below. 

DataNinja777_0-1717243522846.png

I attach an example pbix file. 

Best regards,

Ritaf1983
Super User
Super User

Hi @AllanBerces 
You can use the formula :

Overall = IF(ISBLANK([FAB]) ||ISBLANK([JC]) || ISBLANK([MAT]),DIVIDE([MAT]+[JC]+[FAB],2),DIVIDE([MAT]+[JC]+[FAB],3))
Ritaf1983_0-1717242721084.png

pbix is attached

 If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Hi @Ritaf1983  Thank you for you reply

i just notice theres something wrong on the column, the value of 2 instead of 72 and 94.

 

Thank you

There was a "writer error " .
' instead of +

The correct formula is :

Overall = IF(ISBLANK([FAB]) ||ISBLANK([JC]) || ISBLANK([MAT]),DIVIDE([MAT]+[JC]+[FAB],2),DIVIDE([MAT]+[JC]+[FAB],3))

Ritaf1983_0-1717244953732.png

 If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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