Discussion Board for collaboration related to QlikView App Development.
easy question for you .
Max(Year) in my script is not working. The goal is to have the current year if the DRKY=07.
Year is a field of my calendar.
How i can do this?
Could please share the sample to check it.
Yes, Max() is an aggr function, you need Group By clause for this.
IF(Match(trim(DRKY), '07'), Max(Year), Left(DRDL01,4)) AS YearUnitCost
Group By DRKY;
SQL Select *
WHERE DRRT = 'CM' AND DRSY = '40';
May be if you are looking for Current Year why dont your use like
IF(Match(trim(DRKY), '07'), Year(Today()), Left(DRDL01,4)) AS YearUnitCost;
Add both fields in the group by:
Group By DRKY,Left(DRDL01,4));
Oh thanks, it got skipped. You are right.
Use year(today()) in place of max(Year).