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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
domtrump
Helper II
Helper II

Calculate grand total by customer to use as filter

I need to filter my entire report to exclude customers who have a total of ZERO over their lifetime for a particular column. Given this data set:

CustIDValAValB
1234050
123400
12340150
4567125100
4567125200

 

I want to be able to EXCLUDE any customers whose Grand Total for ValA = 0. So in this example, Only customer 4567 would be on my report. 

 

Not sure if I should put this in a calculated COLUMN that Sum's up ValA by customer resulting in this:

CustIDValAValBValC
12340500
1234000
123401500
4567125100250
4567125200250

and then just filter out the zeros? How would I write the CalcColumn for ValC?

 

Or if there is a better way? Advice please.

 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@domtrump Try:

ValC Column =
  VAR __Sum = SUMX(FILTER(ALL('Table'), [CustID] = EARLIER('Table'[CustID])),[ValA])
RETURN
  __Sum


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

@domtrump Try:

ValC Column =
  VAR __Sum = SUMX(FILTER(ALL('Table'), [CustID] = EARLIER('Table'[CustID])),[ValA])
RETURN
  __Sum


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

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.