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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
cbrandt
Regular Visitor

Summarize a Column Without Showing Total

I've looked through the forums and can't seem to find anything like this.  I want to group and summarize items in a column but as the numbers in some rows have nothing to do with numbers in others a total at the end does not make sense.  I'n the included photo the first table has a sum on the "Quantity" Column and "XTD Cost" column and it looks the way I want except for the "Total" on the "Quantity" column.  The second table has a sum only on the "XTD Cost".   Any Help is much appreciated!

Thanks!

PowerBICapture.png

 

2 ACCEPTED SOLUTIONS
erik_tarnvik
Solution Specialist
Solution Specialist

Hi @cbrandt,

I recommend using the HASONEVALUE() function to detect whether you are in a total contaxt in the definition of the measures used in your model.

 

Here is a link to an article that explains the concept:

https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/

View solution in original post

Hi @cbrandt

Your approach is slightly wrong. You should try ...

 


Measure = IF(HASONEVALUE(Table1[Quantity]),  SUM(Table1[Quantity]), BLANK())

The formula can be read as ... If the total of values of the [Quantity] column of the Table1 is one then sum the quantity. If not then leave it BLANK. 

In the totals there is no filter as in each of the rows of the visual you have placed. So ... it takes on account all of the values. Showing the total is prevented by using HASONEVALUE.

Hope That Helps

Vicente

View solution in original post

3 REPLIES 3
erik_tarnvik
Solution Specialist
Solution Specialist

Hi @cbrandt,

I recommend using the HASONEVALUE() function to detect whether you are in a total contaxt in the definition of the measures used in your model.

 

Here is a link to an article that explains the concept:

https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/

Thanks for the help @erik_tarnvik.  I have tried this method but the results are the same as the original.  Probably a mistake in my formula?   

Measure = IF(HASONEVALUE(Table1[Quantity]), VALUES(Table1[Quantity]), SUM(Table1[Quantity]))

PowerBICapture2.png 

Hi @cbrandt

Your approach is slightly wrong. You should try ...

 


Measure = IF(HASONEVALUE(Table1[Quantity]),  SUM(Table1[Quantity]), BLANK())

The formula can be read as ... If the total of values of the [Quantity] column of the Table1 is one then sum the quantity. If not then leave it BLANK. 

In the totals there is no filter as in each of the rows of the visual you have placed. So ... it takes on account all of the values. Showing the total is prevented by using HASONEVALUE.

Hope That Helps

Vicente

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Solution Authors
Top Kudoed Authors