Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

YTD issue

Hi all,

         I working on a requirement which need to show YTD and when i select a month it just default the value to only that month instead of showing YTD.

can some body help .. i'm attaching my Data file and QlikView file which explains the requirement with example and calucaulation required at chart level

have a great day

Sri1

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

just figured out the expression actually we used variables  as below

Sum({$<MonthName=,

MonthNum = {">=$(=vStartMonth)<=$(=vEndMonth) "}>} Metric)

vStartMonth  =(max(FiscalYear)-1) * 12 -3

vEndMonth = Max({<FiscalYear = {'$(=Max(FiscalYear))'}>}MonthNum)

and in chart to YOY comparison by Month

I used this expression

=rangesum(Above( TOTAL sum({<Monthname =,FiscalYear = {$(=Max(FiscalYear))}>}Metric)

hope this helps others

Sri1

View solution in original post

5 Replies
MK_QSL
MVP
MVP

=sum({$<FiscalYear=, MonthNum=, MonthNum = {'<=$(=Max({<FiscalYear = {$(=max(FiscalYear))}>}MonthNum))'}>}Metric)

UPDATED:

=SUM({<MonthNum = , MonthName=, FiscalYear=,  MonthNum = {">=$(=Min({<FiscalYear = {'$(=Max(FiscalYear))'}>}MonthNum))<=$(=Max({<FiscalYear = {'$(=Max(FiscalYear))'}>}MonthNum))"}>}Metric)

Anonymous
Not applicable
Author

Thanks for the reply Manish,

when I make my selection as year = 2015,

then it just showing whole sum of metric from 2010 to 2015.

Regards

Sri1

MK_QSL
MVP
MVP

=SUM({<MonthNum = , MonthName=, FiscalYear=,  MonthNum = {">=$(=Min({<FiscalYear = {'$(=Max(FiscalYear))'}>}MonthNum))<=$(=Max({<FiscalYear = {'$(=Max(FiscalYear))'}>}MonthNum))"}>}Metric)

Anonymous
Not applicable
Author

Thanks Again Manish..

I already tried that expression but issue here is when a user selects 2015 and Month Feb it just calculate the metric value for month Feb ..but we need  metric value to be summed from Sep to Feb (even for Month selection).

Thanks for Your patience

Sri1

Anonymous
Not applicable
Author

just figured out the expression actually we used variables  as below

Sum({$<MonthName=,

MonthNum = {">=$(=vStartMonth)<=$(=vEndMonth) "}>} Metric)

vStartMonth  =(max(FiscalYear)-1) * 12 -3

vEndMonth = Max({<FiscalYear = {'$(=Max(FiscalYear))'}>}MonthNum)

and in chart to YOY comparison by Month

I used this expression

=rangesum(Above( TOTAL sum({<Monthname =,FiscalYear = {$(=Max(FiscalYear))}>}Metric)

hope this helps others

Sri1