Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save $400 before Dec 31st: REGISTER NOW!
cancel
Showing results for 
Search instead for 
Did you mean: 
jmialoundama
Creator III
Creator III

Sum all previous month in bar chart

Hi, 

Ihave a bar chart and i want to add a bar for all previous value and anoter char for all futur value like this :

jmialoundama_0-1655875356394.png

I have this graph with this formula in expression : 

=Sum({<[Date_amount] = {'>=$(=vCurrentMonth)<=$(=v7NextMonth)'}>}[Amount])

jmialoundama_1-1655874560889.png

I want to sum all previous values inferior or equal to vCurrentMonth and all futur values superior or equal to v7NextMonth

I create this formula which work good in pivot table : 

Past valueif([Date amount] <= '$(=vCurrentMonth)',Sum([Amount]))

futur value : if([Date amount] >= '$(=v7NextMonth)',Sum([Amount]))

jmialoundama_2-1655874829837.png

 

But in my bar chart i want single  bar for all previous values split by flag "Amount ok / Amount not ok" and another single column for all futur values split by "Amount ok / not ok" ? 

Thanks you in advance 🙂

 

Labels (3)
1 Reply
vinieme12
Champion III
Champion III

refr this article

https://community.qlik.com/t5/QlikView-Documents/Calculating-rolling-n-period-totals-averages-or-oth...

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.