Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Daniel99
Contributor II
Contributor II

How to Sum YTD Revenue using addmonths

Hi All,

if i want to sum the revenue for YTD. should i put 'sum' before if on my syntax.

example:

=sum(if([CPR_TM1_202202.Business]='CMB', [CPR_TM1_202202.MONTH]>=AddMonths(today(),-8,[CPR_TM1_202202.amount]))/1000000000

Daniel99_0-1650943562389.png

 

i want sum using kpi chart.

any solution? Thank you.

 

Regards, 

Daniel

Labels (6)
1 Reply
Daniel99
Contributor II
Contributor II
Author

still got an error with this syntax

=Sum(if({<[CPR_TM1_202202.MONTH] = {">=$(=2021(Max([CPR_TM1_202202.MONTH])))<=$(=AddMonths(2022(Max([CPR_TM1_202202.MONTH])),-1))"}>} and [CPR_TM1_202202.Business]='CMB',[CPR_TM1_202202.amount]/1000000000)))