Good afternoon,
I have a column in my "SourceDataTable" that is called "Success" that holds outcomes of data and I need to be able to add these all up based on the outcome in "Success"
In the example below I am filtering by "Area", "Brand" & "Date" as per below, but I need the Calculation to add up the words "Direct", "1 question" etc..
The Works formula below works but I have 2 sections underlined and I am unsure why as I haven't used "IN" before, but when I nest the "Syntax Error" one it fails but I am unsure what I have missed.
Any help greatly appreciated
thanks in advance
Gavin
I have a column in my "SourceDataTable" that is called "Success" that holds outcomes of data and I need to be able to add these all up based on the outcome in "Success"
In the example below I am filtering by "Area", "Brand" & "Date" as per below, but I need the Calculation to add up the words "Direct", "1 question" etc..
The Works formula below works but I have 2 sections underlined and I am unsure why as I haven't used "IN" before, but when I nest the "Syntax Error" one it fails but I am unsure what I have missed.
Any help greatly appreciated
Code:
Works
=if(SourceDataTable[Outcome]="Success",CALCULATE(COUNTROWS(SourceDataTable),
FILTER(SourceDataTable,SourceDataTable[Area]=SourceDataTable[Area]),FILTER(SourceDataTable,SourceDataTable[Brand]=SourceDataTable[Brand]),
FILTER(SourceDataTable,SourceDataTable[Week No]=WEEKNUM(today(),21)-1),
SourceDataTable[Success] in {"direct","1 Questions","2 Questions","3 Questions","4 Questions","5 Questions"}),blank()
Syntax Error
=if(SourceDataTable[Outcome]="Success",CALCULATE(COUNTROWS(SourceDataTable),
FILTER(SourceDataTable,SourceDataTable[Area]=SourceDataTable[Area]),FILTER(SourceDataTable,SourceDataTable[Brand]=SourceDataTable[Brand]),
FILTER(SourceDataTable,SourceDataTable[Week No]=WEEKNUM(today(),21)-1),
SourceDataTable[Success] IN {"Direct","1 Questions","2 Questions","3 Questions","4 Questions","5 Questions"}),
if(SourceDataTable[Outcome]="Fail",CALCULATE(COUNTROWS(SourceDataTable),
FILTER(SourceDataTable,SourceDataTable[Area]=SourceDataTable[Area]),FILTER(SourceDataTable,SourceDataTable[Brand]=SourceDataTable[Brand]),
FILTER(SourceDataTable,SourceDataTable[Week No]=WEEKNUM(today(),21)-1),
SourceDataTable[Success] IN {"Direct","A1","A2","A3","A4","A5"}),
BLANK())
thanks in advance
Gavin