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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
aeg23
Regular Visitor

Subtotal by column and not as an aggregate?

Hello,

 

Below you will see 4 different measures I created:

 

Completed Closings = CALCULATE(COUNT('Individual Activity Report'[Order Number]),'Individual Activity Report'[Signing Type]="Completed Closings",'Individual Activity Report'[Service Status]="Completed")

 

Closing Goal = SUM('Excused Days'[Standard Number of Closings])

 

Bonus Closings = IF([Completed Closings]>[Closing Goal],[Completed Closings]-[Closing Goal],0)

 

Bonus $ = [Bonus Closings]*67.50

 

I would like for the Bonus Closings and Bonus$ to sum as a column and not as an aggregate. I have tried creating calculated columns but my formulas fail. Can anyone point me in the right direction please?

 

PBI Example.PNG

 

1 ACCEPTED SOLUTION

@ChandeepChhabra Thank you for your reply, and my apologies for not responding sooner. The formula you provided did not work, but I got around it by creating a Summarization Table for all of the data I wanted to add up by column rather than as an aggregate. It worked for what I needed:

 

Summarization Table = SUMMARIZECOLUMNS('Individual Activity Report'[Week Ending Date],'Individual Activity Report'[Partner Name ],"Completed Closings",(CALCULATE(COUNT('Individual Activity Report'[Order Number]),'Individual Activity Report'[Signing Type]="Completed Closings",'Individual Activity Report'[Service Status]="Completed")),"Notary Trip Fees",CALCULATE(COUNT('Individual Activity Report'[Signing Type for Notary Trip]),'Individual Activity Report'[Service Status]="Completed"),"Post Closing Request",CALCULATE(COUNT('Individual Activity Report'[Order Number]),'Individual Activity Report'[Signing Type]="Post Closing Requests",'Individual Activity Report'[Service Status]="Completed"),"Document Notifications",CALCULATE(COUNT('Individual Activity Report'[Order Number]),'Individual Activity Report'[Signing Type for Document Notification]="Document Notifications",'Individual Activity Report'[Service Status]="Completed"))

View solution in original post

2 REPLIES 2
ChandeepChhabra
Impactful Individual
Impactful Individual

@aeg23 Try this modified measure 

 

Bonus Closings = IF([Completed Closings]>[Closing Goal], IF(HASONEVALUE('Individual Activity Report'[Week Ending]),SUMX('Individual Activity Report',[Completed Closings]-[Closing Goal]), [Completed Closings]-[Closing Goal]),0)

 

If this doesn't work, please share a link where I can download your pbi file

@ChandeepChhabra Thank you for your reply, and my apologies for not responding sooner. The formula you provided did not work, but I got around it by creating a Summarization Table for all of the data I wanted to add up by column rather than as an aggregate. It worked for what I needed:

 

Summarization Table = SUMMARIZECOLUMNS('Individual Activity Report'[Week Ending Date],'Individual Activity Report'[Partner Name ],"Completed Closings",(CALCULATE(COUNT('Individual Activity Report'[Order Number]),'Individual Activity Report'[Signing Type]="Completed Closings",'Individual Activity Report'[Service Status]="Completed")),"Notary Trip Fees",CALCULATE(COUNT('Individual Activity Report'[Signing Type for Notary Trip]),'Individual Activity Report'[Service Status]="Completed"),"Post Closing Request",CALCULATE(COUNT('Individual Activity Report'[Order Number]),'Individual Activity Report'[Signing Type]="Post Closing Requests",'Individual Activity Report'[Service Status]="Completed"),"Document Notifications",CALCULATE(COUNT('Individual Activity Report'[Order Number]),'Individual Activity Report'[Signing Type for Document Notification]="Document Notifications",'Individual Activity Report'[Service Status]="Completed"))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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