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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
fergmn
Frequent Visitor

SUM/Count in Power Bi

Hi, I was wondering if there is a way to sum my sales data instead of it showing the count in PowerBi. I want to look at the sum of sales instead of the count in some of my charts. 

1 ACCEPTED SOLUTION
JirkaZ
Solution Specialist
Solution Specialist

Well I believe the error message says it all. The HMO[Sales] field is a text field - not a numerical field. You have change the type of the field first.

View solution in original post

13 REPLIES 13
JirkaZ
Solution Specialist
Solution Specialist

Sure - create a measure for whatever calculation you need. 

 

Example (Sum of sales amount):

My Sales Amount := SUM('MyFactTable'[Sales Amount])
fergmn
Frequent Visitor

Hi JirkaZ, 

 

 

 

I tried the measure MySalesAmount:=SUM(HMO[Sales]) and it didn't work am I do doing something wrong.

JirkaZ
Solution Specialist
Solution Specialist

Please give more details. What exactly didn't work, where are you stuck? Maybe a couple of screenshots with the definition and the way you're trying to use it would help.

fergmn
Frequent Visitor

Hi, I am trying to show the Sum of Sales. My fields are Market, Partner, and Sales. When I move the sales in the values spot it is showing the count of sales. I would like to see the Sum of Sales or have a field with the

20230208_111707.jpg

Sum of Sales so I can use it to create additional visualizations. I hope I explained it right. 

fergmn
Frequent Visitor

20230208_094309.jpg

20230208_111733.jpg

JirkaZ
Solution Specialist
Solution Specialist

Well you have to drop the measure to the Values section of the visual for it to work (replacing what's there currently)

fergmn
Frequent Visitor

Hi JirKaz, 

So I tried the measure and exactly what you told me and this happened. 

20230208_131513.jpg

20230208_131520.jpg

20230208_131537.jpg

20230208_094309.jpg

JirkaZ
Solution Specialist
Solution Specialist

What does the "See details" say? Do you have relationships existing and working between the HMO table and any other table that you are trying to use in the visual?

fergmn
Frequent Visitor

Hi JirkaZ, I am attaching a picture of what the 'See details' says, and I do not have a relati

20230208_201735.jpg

20230208_201737.jpg

onship set up. I do have 2 sets of data I am working with though, and will eventually use the 2nd set of data in my current page. 

JirkaZ
Solution Specialist
Solution Specialist

Well I believe the error message says it all. The HMO[Sales] field is a text field - not a numerical field. You have change the type of the field first.

fergmn
Frequent Visitor

This definately solved my issue. Thank you so much. 

fergmn
Frequent Visitor

Do I create this measure before inserting any graphs? 

JirkaZ
Solution Specialist
Solution Specialist

Creating Measures (calculations) is part of the data modeling/preparation. So you do that before you visualize the data.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.