Forum Discussion
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.
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.
13 Replies
- JirkaZSolution Specialist
Sure - create a measure for whatever calculation you need.
Example (Sum of sales amount):
My Sales Amount := SUM('MyFactTable'[Sales Amount])- fergmnFrequent Visitor
Do I create this measure before inserting any graphs?
- JirkaZSolution Specialist
Creating Measures (calculations) is part of the data modeling/preparation. So you do that before you visualize the data.
- fergmnFrequent Visitor
Hi JirkaZ,
I tried the measure MySalesAmount:=SUM(HMO[Sales]) and it didn't work am I do doing something wrong.
- JirkaZSolution 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.