Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

poojashribanger
Contributor 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
MVP
MVP

Re: Set Analysis Upper Bound

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
Contributor II

Re: Set Analysis Upper Bound

same Finance Date i am using

MVP
MVP

Re: Set Analysis Upper Bound

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

poojashribanger
Contributor II

Re: Set Analysis Upper Bound

yes

MVP
MVP

Re: Set Analysis Upper Bound

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

poojashribanger
Contributor II

Re: Set Analysis Upper Bound

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)

Community Browser