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: 
nima94
Contributor III
Contributor III

AGGR function - it changes value based on range

hi

this is my Formula but the value keep changing  the value of sale when im selecting a range of date. please help me to fix and be in-depended of date rage

 

sum( aggr (sum (DISTINCT[AMOUNT]),[ID]))

1 Solution

Accepted Solutions
Brett_Bleess
Former Employee
Former Employee

Couple of Design Blog posts that might be useful in getting things sorted on your own if you are still working on them, otherwise other members may find them helpful on this one:

https://community.qlik.com/t5/Qlik-Design-Blog/Set-Analysis-in-the-Aggr-function/ba-p/1463822

https://community.qlik.com/t5/Qlik-Design-Blog/A-Primer-on-Set-Analysis/ba-p/1468344

https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/ChartFunctions/...

If you did figure things out, it would be appreciated if you would return to the thread, post what you did, and then mark that post as the solution by using the Accept as Solution button to close things out.

Regards,
Brett

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.

View solution in original post

4 Replies
tresesco
MVP
MVP

Try including set analysis in aggregation functions like:

sum( {<YourDatefield>} aggr (sum ( {<YourDatefield>} DISTINCT[AMOUNT]),[ID]))

nima94
Contributor III
Contributor III
Author

Thanks For your repply but it makes my value to '0'

tresesco
MVP
MVP

Perhaps, something is not being done properly. Could you share a sample app to check? 

Brett_Bleess
Former Employee
Former Employee

Couple of Design Blog posts that might be useful in getting things sorted on your own if you are still working on them, otherwise other members may find them helpful on this one:

https://community.qlik.com/t5/Qlik-Design-Blog/Set-Analysis-in-the-Aggr-function/ba-p/1463822

https://community.qlik.com/t5/Qlik-Design-Blog/A-Primer-on-Set-Analysis/ba-p/1468344

https://help.qlik.com/en-US/qlikview/April2020/Subsystems/Client/Content/QV_QlikView/ChartFunctions/...

If you did figure things out, it would be appreciated if you would return to the thread, post what you did, and then mark that post as the solution by using the Accept as Solution button to close things out.

Regards,
Brett

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.