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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

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
Community Champion
Community 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]),



Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community 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]),



Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler Thank you Greg again!

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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