Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
poojashribanger
Creator II
Creator II

Set Analysis Upper Bound

(Sum({<[Finance Date] ={">=$(=YearStart(AddYears(max({<FiscalQuarter=,FiscalQuarter=>}[Finance Date]),-1),0,4))<=$(=AddYears(max({<FiscalQuarter=,FiscalYear=>}[Finance Date]),-1))"},

FiscalQuarter=,FiscalYear=>}[Service Revenue])/avg({<[Finance Date] ={">=$(=YearStart(AddYears(max({<FiscalQuarter=,FiscalQuarter=>}[Finance Date]),-1),0,4))<=$(=AddYears(max({<FiscalQuarter=,FiscalYear=>}[Finance Date]),-1))"},

FiscalQuarter=,FiscalYear=>}USD_RATE))/1000000


This expression gives me YearStart(AddYears(max({<FiscalQuarter=,FiscalQuarter=>}[Finance Date]),-1),0,4)='4/1/2016'

and this expression gives AddYears(max({<FiscalQuarter=,FiscalYear=>}[Finance Date]),-1)='2/28/2017'


when i sum(revenue) for this date it should give me 2.10k

but my set analysis is excluding upper bound while summing revenue i.e '2/28/2017'(It is not considering this date)

only from '4/1/2016' to '1/31/2017' it is summing up revenue.


please help


6 Replies
sunny_talwar

Are you may be selecting in another date and time related field which might be conflicting with your set analysis to show the month of Feb?

poojashribanger
Creator II
Creator II
Author

same Finance Date i am using

sunny_talwar

So, the only selection you have made is in Finance Date to select 02/28/2018?

poojashribanger
Creator II
Creator II
Author

yes

sunny_talwar

Then I am not sure what might be wrong... would you be able to share a sample?

poojashribanger
Creator II
Creator II
Author

my expression is like

Sum({<[Finance Date] ={">=$(=QuarterStart(max([Date]),-1))<=$(=Quarterend(max([Date]),-1))"}>}[Service Revenue])

my year starts from 1st april till march 31st(Fiscal Calender)

let us assume my date column has max(date) as 2/28/2018

then my QuarterStart(max([Date]),-1) will be 1/10/2017

Quarterend(max([Date]),-1) will be 31/12/2017


then my above expression should give me sum(revenue) starting from 1/10/2017 till 31/12/2017.

but in my case it is giving from 1/10/2017 till 30/11/2017 (it is excluding 31/12/2017)