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

Bookmark with variable on calendar day

Hi experts

I built a variable for calendar day: [Calendar Day]=Date(Today()-1)

This variable is part of a bookmark. Now I need a formula which regardless of the bookmark (today-1 day) calculates a KPI over all days and not only the previous day.

Instead of the filter bookmark value '-1',  I used '0'. But this formula is not working:

avg(aggr(Sum({<"=[Calendar Day]=Date(Today()-1)"={'0'}>} Amount), [Calendar Day]))

Any ideas?

Thanks, Tom

Labels (6)
1 Solution

Accepted Solutions
TomBond77
Creator III
Creator III
Author

I solved it via this blog: https://community.qlik.com/t5/New-to-Qlik-Sense/help-with-AVG-AGGR-Count-Set-Analysis-and-ignoring-a...

 

Correct formula on my side: 

avg({<Calendar Day>} aggr(Sum({<[Product Unit]={'Cars'}, Calendar Day=>} Amount), [Calendar Day]))

View solution in original post

2 Replies
justISO
Specialist
Specialist

Hi, maybe just remove date filtering? Leave expression something like this:

avg(aggr(Sum(Amount), [Calendar Day]))

TomBond77
Creator III
Creator III
Author

I solved it via this blog: https://community.qlik.com/t5/New-to-Qlik-Sense/help-with-AVG-AGGR-Count-Set-Analysis-and-ignoring-a...

 

Correct formula on my side: 

avg({<Calendar Day>} aggr(Sum({<[Product Unit]={'Cars'}, Calendar Day=>} Amount), [Calendar Day]))