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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.