Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
CUSTOMERS ONLY: Now accepting customer applications for the 2023 Luminary Program: SUBMIT NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
chandra63
Creator
Creator

minYear to Maxyear (YTD)

hi,

I'm new to Qlikview and am trying to get something I thought was relatively simple but seems bit difficult.please help me to get this.

i have year field(FY)-2016,2017,2018,2019

Variables : vMinyear and vMaxyear

 have to calculate Revenue  

suppose if i select 2016 output should be 2016 to 2019

if 2017: 2017 ,2018, 2019

2018: 2018 to 2019

i have tried like below

sum({<FY={">=$(vMinyear)<=$(vMaxyear)"}>}Revenue) but it showing selected year only.

 

same for  Quarter  

Please let me know how to achieve this via set analysis.

Thanks in Advance.

Chandra

24 Replies
chandra63
Creator
Creator
Author

Hi Pradosh,

Variable is done in variable  overview as same as we discussed.

but still it is showing single year value.

=sum({<FY={">=$(vMinyear)<=$(vMaxyear)"}>}Revenue)

 

Thanks,

Chandra

pradosh_thakur
Master II
Master II

I have attached a sample.

Learning never stops.
chandra63
Creator
Creator
Author

 Hi,

Thanks Pardosh .

Its working Fine .Same as like Year i want to create for Quarter.

 

Thanks you very much.

Chandra

chandra63
Creator
Creator
Author

Hi Pardosh,

help me for QTD also

Thanks Chandra

pradosh_thakur
Master II
Master II

How does your quarter data looks like ?

 

P.S: Please mark correct answer whichever is appropriate , You can mark helpful comments as well.

Learning never stops.
chandra63
Creator
Creator
Author

Hi Pradosh,

 

Quarter field is Quarter 

Q1,Q2,Q3 and Q4 are the values

 

above expression :

=sum({<FY={">=$(vMinyear)<=$(vMaxyear)"}>}Revenue) is working fine

 

but the expression has to give like below

=If(Group='revenue',=sum({<FY={">=$(vMinyear)<=$(vMaxyear)"}>}Revenue),

         if(Group='expense',sum({<FY={">=$(vMinyear)<=$(vMaxyear)"}>}Expense))

Above xpression is showing the value for the selected year.

Please help me.

Thanks

Chandra

 

pradosh_thakur
Master II
Master II

=If(Group='revenue',sum({<FY={">=$(vMinyear)<=$(vMaxyear)"}>}Revenue),

         if(Group='expense',sum({<FY={">=$(vMinyear)<=$(vMaxyear)"}>}Expense)
))
Learning never stops.
chandra63
Creator
Creator
Author

Hi Pradosh,

 

 

Still, it's Showing the selected year in the report.

PFA below.

 

Expression Is :

=If(Group='REVENUE_Flash' ,sum({<FY={">=$(vMinyear)<=$(vMaxyear)"},Flag={1}>}Revenue),

if(Group='EXPENSE_GL',sum({<FY={">=$(vMinyear)<=$(vMaxyear)"}>}MORvalue)
))

Thanks,

Chandra

pradosh_thakur
Master II
Master II

=If(Group='REVENUE_Flash' ,sum({1<FY={">=$(vMinyear)<=$(vMaxyear)"},Flag={1}>}Revenue),

if(Group='EXPENSE_GL',sum({1<FY={">=$(vMinyear)<=$(vMaxyear)"}>}MORvalue)
))
Learning never stops.
chandra63
Creator
Creator
Author

Hi Pradosh,

Still, it remains the same with your expression.

Thanks,

Chandra