Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
matthewp
Creator III
Creator III

error in set modifier expression for avg expression with clause

My expression will not work and i am getting the error "error in set modifier expression", it is only a simple expression but i cant understand why it wont work.

avg({<NOT ISNULL([table.ApproveDate])>} table.days)

10 Replies
sunny_talwar

I would suggest to create a new field in the script like this

LOAD table.ApproveDate,

           If(Len(Trim(table.ApproveDate)) = 0, 1, 0) as NullFlag

Now you can try like this:

Null

Avg({<NullFlag = {1}>} table.days)

Not Null

Avg({<NullFlag = {0}>} table.days)