Skip to main content
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
pradosh_thakur
Master II
Master II

is this for QTD ? Then you have to change your expression.

Learning never stops.
chandra63
Creator
Creator
Author

no, it's for YTD.

pradosh_thakur
Master II
Master II

Do you have a date column ?

 

the expression can be tweaked to give the out put for cureent year but it will not be YTD as it will contin future this year's date as well.

you can try 

{<FY={"$(=year(today())"}>}  

 

this will give you sales/revenue for current year but for ytd(year to date)  aas the name suggest you need a date column

Learning never stops.
chandra63
Creator
Creator
Author

Hi,

 

Static_date is the date field 

pradosh_thakur
Master II
Master II

have a look 

 

this shall solve all the queries. Let me know if you need assistance and if this helped you or not as well

 

https://community.qlik.com/t5/QlikView-Documents/Date-Level-Analysis-WTD-MTD-QTD-YTD-Current-Year-Pr...

Learning never stops.