Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Maciej29
Contributor III
Contributor III

Count if / avg if

I have a question, as i have no idea why this formula doesn't work properly :

 

avg({<[Date Verified]={'>=$(=WeekStart(Today()-7))<=$(=Date(WeekEnd(Today()-7)-1))'}>}[KPI])

 

I would like to get average KPI  for last week (last 5 working days), based on date verified. Only formula, no script version because i'm not familiar with it.

Much appreciate if anyone can help.

1 Solution

Accepted Solutions
Vegar
MVP
MVP

It could be your single quotes. Try using double quotes in your set modifier. Like this :

avg({<[Date Verified]={">=$(=WeekStart(Today()-7))<=$(=Date(WeekEnd(Today()-7)-1))"}>}[KPI])

View solution in original post

2 Replies
Vegar
MVP
MVP

It could be your single quotes. Try using double quotes in your set modifier. Like this :

avg({<[Date Verified]={">=$(=WeekStart(Today()-7))<=$(=Date(WeekEnd(Today()-7)-1))"}>}[KPI])

Maciej29
Contributor III
Contributor III
Author

... easier than i thought.  Thanks a lot !

Could you please clarify what the difference is between single and double quotation ? I thought it's all the same..