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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Anonymous
Not applicable

Sum of values where measure is greater than 1

I'm looking to sum the values of a measure called, "Occurence Count", were the measure exceeds the value of 1.

 

Table:

mail, Occurence Count

test@test.com, 34

mail@nomail.com, 57

actualemail@gmail.com, 1

 

The resulting value I need to display is (34+57)=91.

The last email value, only has a count of 1, so I would not want to add this to the sum.

 

Background Info:

Some background, I took the distinct values from a table containing email addresses so that the table only contains unique email addresses.

 

Distinct Email = DISTINCT(originaltable[Email])

 

I created a measure counting email addresses from the original table. I put the new table values up and selected the measure to display the above sample table.

 

Distinct Email Count = COUNT(originaltable[Email])

 

The measure occurence count just counts the number of times a value displays in the data set.

Let me know if there is a better way of doing this as well.

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@Anonymous 

 

Try create a summrized table:

 

Measure = 
var temptable = SUMMARIZE('originaltable','originaltable'[Email],"Count",COUNT('originaltable'[Email]))
Return SUMX(FILTER(temptable,[Count]>1),[count])

 

 

Paul Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
V-pazhen-msft
Community Support
Community Support

@Anonymous 

 

Try create a summrized table:

 

Measure = 
var temptable = SUMMARIZE('originaltable','originaltable'[Email],"Count",COUNT('originaltable'[Email]))
Return SUMX(FILTER(temptable,[Count]>1),[count])

 

 

Paul Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Thank you this was helpful!

Greg_Deckler
Super User
Super User

This looks like a measure aggregation problem. See my blog article about that here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149



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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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