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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
JustinDoh1
Post Prodigy
Post Prodigy

How to add a column/measure to calculate Average in Matrix (or Table)?

I am sharing my Pbix file here.

(This is same question that I posted to the "Desktop" yesterday, but I have not gotten any feedback, so I decide to ask in "DAX Commands and Tips".)

 

I am trying to add a Column here in Matrix that calculates Average of all numbers listed throughout dates:

So, example, it would be (21+21+19+19..+20) / 8 = average for "VA".

 

Currenly, I only have Total (that comes matrxi as Column subtotals).

JustinDoh1_0-1654889545556.png

 

 

This is illustration of Rows, Columns and Values from Pbix file:

JustinDoh1_1-1654889545548.png

 

 

What is formula for column? Do I have to use measure for this?

If Matrix is not possible, should I change to Table visual?

 

Thanks.

1 ACCEPTED SOLUTION

8 REPLIES 8
JustinDoh1
Post Prodigy
Post Prodigy

@vapid128 Thank you so much!

vapid128
Solution Specialist
Solution Specialist

add measure

 

DailyClients = AVERAGEX(VALUES([DATE]), CALCULATE([# OF CLINTS]))

 

vapid128_0-1654901828369.png

 

@vapid128 

Sorry for bothering you again.

I am trying to understand how measure works in PowerBI.

 

I know this (bottom image) is where it addes column subtotal.

But, what caused this to not display "subtotal", but display "average"?

If I put Column subtotals as "off", no "average" shows up, so I am wondering how does Average tie to "subtotals".

JustinDoh1_0-1655753118066.png

Thanks.

 

@vapid128 Thank you so much.

How do you put the measure at the end only?

Mine looks like this (repeating):

JustinDoh1_0-1654902381019.png

JustinDoh1_1-1654902435329.png

I was not able to put inside Column directly..

 

Thanks.

 

 

remove the (# of Clients) in values

@vapid128 

Thank you so much!

Sorry. one more thing..

Is there way to format number to display with no decimal for each day's value but with one decimal for the average (illustrated as below)?

JustinDoh1_0-1654903161313.png

 

 

vapid128_0-1654906173864.png

 

@vapid128  

I am tryng to understand the logic of this measure (decimalFix) here.

How does the "Average" not be considered as 

DISTINCTCOUNT(DimDate1[DateFormat])<>1 ?
Thanks.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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