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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

SUM function not working

I have a column (advancecareplancompleted)that has binary values- 0,1. I want to sum all the rows to get the total number of 1s. However, power BI returns total as 1. What should I need to do. I tried creating a measure but even that shows same result.

 

klalwani_0-1668705877461.png

 

4 REPLIES 4
ghaines
Resolver I
Resolver I

We do need more information as other commenters have said.  However, assuming you have set up everything correctly, hover over the visual, click on the filter/funnel icon to check what filters are applied to make sure you are not accidentally filtering the visual to a single project.

daXtreme
Solution Sage
Solution Sage

What measure did you create then? You should show us all the things that are relevant to the problem at hand. Hiding details is not the best strategy. What does it mean "binary values"? What type are they? If they're integers, then the measure is simple: SUM( T[Value] ). And that's all you need. If this does not work, then your model is most likely dodgy in some way.

djurecicK2
Super User
Super User

Hi @Anonymous ,

 if the goal is to Sum the values, would you consider changing the data type to integer?

 

I think you might need to use Count instead of sum and filter on value=1

Based on the name of the column in the visual, it looks like advanceCarePlanCompleted is a column within a project table that is set to 0 or 1.  If you used count for this column, the result would always be blank, 1 or 2.

 

But I just think we're fumbling in the dark unless the poster adds more details.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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