Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

siddharthsoam
Contributor

Calculating annualized revenue

Hi

I want to calculate annualized revenue i.e. (sum of revenue for previous 4 quarters with respect to my selection)

  

Fiscal YearQuartersRevenue
FY17Q142
FY17Q226
FY17Q389
FY17Q434
FY18Q132
FY18Q253
FY18Q375
FY18Q440

For example if I select  FY18 Q3 the expression should return me the summed up revenue of FY18 Q3,Q2,Q1 and FY17 Q4 i.e. 194.

Also if there is no fiscal year selection by default it should consider  FY18 .

5 Replies
YoussefBelloum
Esteemed Contributor

Re: Calculating annualized revenue

Hi,

here i think you should create a quarter_year field to simplify the expressions on the front-end, otherwise it will be a bit complicated..

siddharthsoam
Contributor

Re: Calculating annualized revenue

Hi Youssef,

Can you please share a detailed approach..

Thanks in advance

YoussefBelloum
Esteemed Contributor

Re: Calculating annualized revenue

on the front end, to write expressions that roll back on the years months quarters etc, we use SET ANALYSIS using DATE field or Month_year field etc (you don't have such informations)..

here the idea is to create a numeric field from your fiscal_year and quarter fields, like this:

Autonumber(quarters&fiscal_year) as quarter_year_num


and use set analysis like this:


=sum({<quarter_year_num={">=$(=Max(quarter_year_num)-4 <=$(Max(quarter_year_num))"}>}Revenue)


YoussefBelloum
Esteemed Contributor

Re: Calculating annualized revenue

tell me if you need a QVF if you couldn't make it work

Re: Calculating annualized revenue

Which object are you trying to do this in? What is the dimensions if this is in a chart object?

Community Browser