Count 2 descriptions in the same Column/Row

gmazza76

Well-known Member
Joined
Mar 19, 2011
Messages
774
Office Version
  1. 365
Platform
  1. Windows
Good afternoon,

I have a data table that counts the individual questions in a table in PowerPivot, but I need to do a total of a few of the options in 1 as a "Success" and I am a bit stuck.
I have used the formula below to work out how many times "Direct" or "Q1" appears seperatley, but I now need to add them together as a total.

what would be the best way to do this as I am struggling a little bit and its driving me mad.

Code:
=if(DataTable[Outcome]="Success",CALCULATE(COUNTROWS(SourceDataTable), FILTER(SourceDataTable,SourceDataTable[Business]=DataTable[Business]),
FILTER(SourceDataTable,SourceDataTable[Brand]=DataTable[Brand]),
FILTER(SourceDataTable,SourceDataTable[Success]="Direct"),FILTER(SourceDataTable,SourceDataTable[Success]="1Question"),
FILTER(SourceDataTable,SourceDataTable[Week No]=WEEKNUM(today(),21)-1)),BLANK())

thanks in advance
Gavin
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
I have tried the following

Code:
=CALCULATE(COUNTROWS(SourceDataTable), FILTER(SourceDataTable,SourceDataTable[Business]=Call_Outcome[Business]&&FILTER(SourceDataTable,SourceDataTable[Brand]=Call_Outcome[Brand])
&&FILTER(AllGreenData,AllGreenData[Success]="S.Direct"&&FILTER(AllGreenData,AllGreenData[Success]="S.D.1 Questions"))))

But I get an error "The expression refers to multiple Columns. Multiple columns cannot be converted to a scalar value"

Any suggestions
Thanks
 
Upvote 0

Forum statistics

Threads
1,225,567
Messages
6,185,727
Members
453,321
Latest member
Fung

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top