Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
wynnjimbbt
Contributor III
Contributor III

set analysis syntax

The variable below works; but I need to return the date and get errors with my set expression:

variable:

sum({$< [Week Ending]=, DGdate = {'$(=Max({$<LogonID ={"*"},[Week Ending]= >}DGdate))'} >} [Avg Collected Balance])

Need:

date({$< [Week Ending]=, DGdate = {'$(=Max({$<LogonID ={"*"},[Week Ending]= >}DGdate))'} >})

the error is "Error in expression: ')' expected

Labels (2)
1 Solution

Accepted Solutions
sunny_talwar

Do you expect to see a single date? or do you need to use Min or Max to get one date from multiple possible dates? Try one of these

If the expected output can only have a single value

Date(Only({$<[Week Ending], DGdate = {'$(=Max({$<LogonID ={"*"}, [Week Ending]>} DGdate))'}>} DGdate)

or if you need Min or Max date from multiple date values

Date(Max({$<[Week Ending], DGdate = {'$(=Max({$<LogonID ={"*"}, [Week Ending]>} DGdate))'}>} DGdate)

Date(Min({$<[Week Ending], DGdate = {'$(=Max({$<LogonID ={"*"}, [Week Ending]>} DGdate))'}>} DGdate)

View solution in original post

6 Replies
sunny_talwar

Did you forget to add the date field in the expression?

Date(Only({$<[Week Ending], DGdate = {'$(=Max({$<LogonID ={"*"}, [Week Ending]>} DGdate))'}>} DGdate)
MohammedMustaq
Partner - Creator
Partner - Creator

Try This.

=sum({$< [Week Ending]=, DGdate = {"=$(=Max({$<LogonID ={"*"},[Week Ending]= >}DGdate))"} >} [Avg Collected Balance])

 

BR

Mohammed Mustaq

 

wynnjimbbt
Contributor III
Contributor III
Author

re-stating the question:
ePortfBal; the variable below works correctly:

sum({$< [Week Ending]=, DGdate = {'$(=Max({$<LogonID ={"*"},[Week Ending]= >}DGdate))'} >} [Avg Collected Balance])

I need to return in a text box the date that the variable selects; so I removed Sum() and used Date(). With the statement below I get syntax issues.

date({$< [Week Ending]=, DGdate = {'$(=Max({$<LogonID ={"*"},[Week Ending]= >}DGdate))'} >})

the error is "Error in expression: ')' expected

sunny_talwar

Date for what?
wynnjimbbt
Contributor III
Contributor III
Author

DGdate

sunny_talwar

Do you expect to see a single date? or do you need to use Min or Max to get one date from multiple possible dates? Try one of these

If the expected output can only have a single value

Date(Only({$<[Week Ending], DGdate = {'$(=Max({$<LogonID ={"*"}, [Week Ending]>} DGdate))'}>} DGdate)

or if you need Min or Max date from multiple date values

Date(Max({$<[Week Ending], DGdate = {'$(=Max({$<LogonID ={"*"}, [Week Ending]>} DGdate))'}>} DGdate)

Date(Min({$<[Week Ending], DGdate = {'$(=Max({$<LogonID ={"*"}, [Week Ending]>} DGdate))'}>} DGdate)