Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
sakamsureshbabu
Creator
Creator

year to date

Hi good morning to all

=((sum({<BILLDETAILENTRYTYPE = {'B'}, BILLCANCELLED = {'N'}, BILLESTIMATE = {'N'}>}BILLDETAILGROSSWEIGHT)/WeightFlag)
-
(sum({<BILLDETAILENTRYTYPE = {'R'}, BILLCANCELLED = {'N'}, BILLESTIMATE = {'N'}>}BILLDETAILGROSSWEIGHT)/WeightFlag)
-
(sum({<BILLDETAILENTRYTYPE = {'O'}, BILLCANCELLED = {'N'}, BILLESTIMATE = {'N'}, URDPURCHASE = {'Y'}>}BILLDETAILGROSSWEIGHT)/WeightFlag))

i am using above expression for calculating total weight , that show total weight what ever i have in my data.

But i need Total Weight based on YTD -- current year To Day

                                                 MTD -- current month To Day

                                                 WTD -- current week to Day (sun day to sat day)

this values are shown in text object   

1 Reply
linusblomberg
Creator II
Creator II

Hi Suresh Babu,

I'm completely new to the QDF and have only spent an hour going through the videos so I don't know if there already is support for these kind of things. What I would do is create a number of basic date variables such as MinDate, MaxDate, YearStart, MonthStart etc. and then create a YTD-variable.

example

so vYTD would be: %_Date={">=$(=$(vDateYearStart))<=$(=$(vDate))"}

then you can just add $(vYTD) in your set-analysis.

Maybe there already built in support for this in QDF I don't know but I'm about to find out.

Hope I could help

/Linus