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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
JustinDoh1
Post Prodigy
Post 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'

 

JustinDoh1_0-1630366888883.png

 

 

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

 

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@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]),


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Super User
Super User

@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]),


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler Thank you Greg again!

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors