cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
vin123 Frequent Visitor
Frequent Visitor

average values then sum based on a unique ID

Hi all. I am trying to get a sum of citations in a faculty but for de-duplicated paperIDs. Here is my dummy data:

 

fac.JPG

As you can see, one faculty can have multiple authors to a paper ID. But I don't want to double count citations if it's for the same paper ID, therefore I want to either exclude the Author column or somehow fix the paper ID column as unique.

 

I'm coming from Tableau so please bare with me as this is the way I'd do it in Tableau:

 {FIXED [Paper ID]: AVG([Citations])}   -- and then SUM this Measure when dragged to the graph.

 

Here is how I'd like the data to look:

 

FacultyCountofPaperIDSum of Citations
Arts420
Science411

 

But what I'm getting is the Arts faculty with 30 citations, because it's counting PaperID1001 twice. 

I'm struggling to find the dax calculation to average the citations by the paper ID, then take the SUM. Or fix the paper ID somehow? Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Super User IV
Super User IV

Re: average values then sum based on a unique ID

Try Like

Sum of Citations= sumx(summarize(table, table[Faculty], table[PaperID],"_Citations" ,max(Citations)),[_Citations])
CountofPaperID = distinctcount(table[PaperID])

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

View solution in original post

2 REPLIES 2
Super User IV
Super User IV

Re: average values then sum based on a unique ID

Try Like

Sum of Citations= sumx(summarize(table, table[Faculty], table[PaperID],"_Citations" ,max(Citations)),[_Citations])
CountofPaperID = distinctcount(table[PaperID])

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges

Connect on Linkedin

View solution in original post

vin123 Frequent Visitor
Frequent Visitor

Re: average values then sum based on a unique ID

this works great, thankyou! 

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors