Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

problem with inyeartodate function.

hi, well i'm new in qlikview, and i have a problem with the function inyeartodate, i need to obtain the sum of a range o dates, this part works well, in my qvw i have a selection of year and month  and a  table where i show this data, if i don't select a year, the function does what supose to do, but when i select a year, the column with de expresion of this function put all the values in 0, i don't know if i'm clear with my problem, but i hope that some one can help me.

pd. sorry for my english

3 Replies
Contributor II

Re: problem with inyeartodate function.

What are the dimensions of your table and what is the expression you're

using the function in? And how is your data structured?

Not applicable

Re: problem with inyeartodate function.

this is my expresion.

Sum(InYearToDate(InvoiceDate,SetDateYear(varMaxDate,$(=max(Year))),-1)*-1 * Amount)

varMaxDate is my top date so with setdateyear i try to chage de year of this date when i select a year but it doesn't work, my dimension is a group, includes client, county, salesperson, the table of sales invoice contains the primary key of the client and salesperson and this are related with the table clients and salespersons, the table of sales invoice is related with a master calendar where i have de dates that i select.

well this i think this is all.

Not applicable

Re: problem with inyeartodate function.

use this in your load statement:if (year2date(Date),1,nul()) as YTD and then in your expression YTD * Amount

at least if I understand your problem....

Community Browser