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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

MTD variance and YTD variance

Hi All:

I am new to Qlikview and I am trying to get this MTD variance and YTD variance to work in the Expression.

I have the field for Crate To and Crate From and the Day Variance working fine.

For the Day variance the Expression is as follows:-

sum (if (invtype='40',goodqty)) + sum (if (invtype='20',goodqty))

-

sum (if (invtype='42',goodqty)) - sum (if (invtype='34',goodqty))

Crate To

sum (if (invtype='40',goodqty)) + sum (if (invtype='20',goodqty))

Crate From

sum (if (invtype='42',goodqty)) + sum (if (invtype='34',goodqty))

Day Variance = Crate To – Crate From

I am trying to get the MTD variance and YTD variance to work.

The MTD variance should be the accumulated figures from Day variance and YTD variance should be the accumulated figures from MTD variance.

I try to use the ‘rangesum’ in the Expression but it does not seem to be working.

I am using Qlikview 7.5 so the setanalysis function does not work for me.

Could anyone please share some light to this?

Thanks a lot

1 Reply
Not applicable
Author

Hi All:

I try to get the MTD variance to work with the following in the Expression but it does not seemd to be working... Not sure where I went wrong.

((sum (if (year (DateTransDate1)<=(year(varcurrdate))

and MonthTransDate1=month(varcurrdate)

and (invtype='20', goodqty)))

+

(sum(if ( year(DateTransDate1) = year (varcurrdate))

and MonthTransDate1 = month(varcurrdate)

and (Invtype = '42 ',goodqty))))

-

(sum(if (year(DateTransDate1)<=(year(varcurrdate))

and MonthTransDate1=month(varcurrdate)

and (invtype='34', goodqty)))

+

(sum(if (year(DateTransDate1)=year(varcurrdate))

and MonthTransDate1=month(varcurrdate)

and (invtype='40', goodqty)))

Could someone please help and let me know where I when wrong...

I am using Qlikview 7.5 so I am not able to use the Set analysis function...

Thanks in advance...