Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
satishqlik
Creator II
Creator II

dynamic total

Hi community,

How to calculate dynamically total sales which is not based on maxdate which should be based on seletion

If select any month of the corresponding year then total sales should display

Sum({<Date = {'>=$(=monthstart(max(Date),-2))<=$(=max(Date))'}>}sales)

It returns only based on maxdate.

Any Ideas??

5 Replies
Not applicable

Hi,

try this

Sum({$<Date = {'>=$(=monthstart(max(Date),-2))<=$(=max(Date))'}>}Amount)


-Joyson G

sunny_talwar

Not sure I completely understand. You want to see last three months and total as the current month?

satishqlik
Creator II
Creator II
Author

Yes Sunny!!

But which is not based on maxdate it should be based on selection.

Is it possible to achieve?

Pls help

Anonymous
Not applicable

Hi try this,

Sum({<Date = {'>=$(=monthstart(max(Date),-2))<=$(=Month(Date))'}>}Amount)   from last 3 months




sunny_talwar

May be like this:

If(Dimensionality() = 0, Sum(Amount), Sum({<Date = {'>=$(=monthstart(max(Date),-2))<=$(=max(Date))'}>}Amount))