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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.