Forum Discussion
JustinDoh1
4 years agoPost Prodigy
Argument '5' in SUMMARIZE function is required
I am trying to figure out what I am missing here:
I am getting error message saying 'Argument '5' in SUMMARIZE function is required'
Refused_Consented_ForRefusedStep2 =
VAR __ClientID = MAX(Table1[ClientID])
VAR __Table12 = FILTER(ALL(Table1),[ClientID]=__ClientID && [Step]=2 )
VAR __Step2Consent =
SUMMARIZE(
FILTER( __Table12,
[Consent] = "Consented" ),
[Consent],
"__ImmunizationDate",SUM(Table1[ImmunizationDate]),
)
VAR __Step2Refuse =
SUMMARIZE(
FILTER( __Table12,
[Consent] = "Refused" ),
[Consent],
"__ConsentDate",SUM(Table1[ConsentDate])
)
VAR __Step2ConsentDate = MAXX(__Step2Consent,[__ImmunizationDate])
VAR __Step2RefuseDate = MAXX(__Step2Refuse,[__ConsentDate] )
VAR __Step2ConsentReturn = MAXX(FILTER(__Step2Consent,[__ImmunizationDate] = __Step2ConsentDate), [Consent])
VAR __Step2RefuseReturn = MAXX(FILTER(__Step2Refuse,[__ConsentDate] = __Step2RefuseDate), [Consent])
Return __Step2RefuseDate
Thank you
JustinDoh1 In your first SUMMARIZE, get rid of the extra comma. Also, you don't really need SUMMARIZE if you are filtering down to just one value but that's not why you are getting the error.
"__ImmunizationDate",SUM(Table1[ImmunizationDate]),
2 Replies
- Greg_DecklerCommunity Champion
JustinDoh1 In your first SUMMARIZE, get rid of the extra comma. Also, you don't really need SUMMARIZE if you are filtering down to just one value but that's not why you are getting the error.
"__ImmunizationDate",SUM(Table1[ImmunizationDate]),
- JustinDoh1Post Prodigy
Greg_Deckler Thank you Greg again!