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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Help with aggregating data (sum 3 activities per id, per day)

Hello,

 

So I am noy yet very strong in aggregating data, my Dax is slowly getting better, but I am a bit stuck.

 

I have this table:

 

iddateactivityactivity_count
3081-Jun-22a312
3081-Jun-22c39
3081-Jun-22b80
3082-Jun-22c251
3082-Jun-22b222
3083-Jun-22a50
3083-Jun-22c223
3083-Jun-22b171
3084-Jun-22b302
3084-Jun-22c106
3084-Jun-22a23

 

I would like to create a measure or seperate table / aggregation:

 

308 is the id (one of many ids), and per day a number is recorded for 3 activities. I would like to get a similar table or measure that sums of the 3 activities (a, b and c) per day, per id. Example: so for day / date 1-Jun-22 the sum is 312+39+80 = 431 ...... and then repeated per day all the way through.

 

Cheers,

Carsten

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks a lot for the reply / solution. In the end I have created an aggregated table, as I was requested to do more data quality measures. Sorry for the late reply. Cheers, Carsten

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thanks a lot for the reply / solution. In the end I have created an aggregated table, as I was requested to do more data quality measures. Sorry for the late reply. Cheers, Carsten

amitchandak
Super User
Super User

@Anonymous , I think simple Measure  sum should do

 

Sum(Table[activity_count])

 

or in case you need to ignore row context


calculate(Sum(Table[activity_count]) , filter( alllselected(Table), Table[id] = max(Table[ID]) && Table[date] = max(Table[date]) ))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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