Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How do i find the current year max month max sale order no. max sale Rate

Dear All,

             I need to find the max sale rate for max sale order no. for the max month in during the year. i used function "last value" and "max" but im not getting the value in my straight table.

Pls find below my table:

Sldet:

LOAD com,

     unit,

     sld_fyr,

   LastValue(sld_ord_no) as sld_ord_no,

     sld_ord_srl,

     itemproduct,

     Date,

     max(sld_rate) as  sld_rate

FROM

D:\Latest_QVD_Generator\sldet.qvd

(qvd)

Group by com,

     unit,

     sld_fyr,

    sld_ord_srl,

    itemproduct,

    Date,

    MONTH,

    sld_rate  

;

Please help me to solve this above issue.

Regards,

Antony.

2 Replies
er_mohit
Master II
Master II

use aggr function in expression

it might helps you

Not applicable
Author

Hi,

     i used below condition but its not showing the max value for all items.

=max(Aggr(FirstSortedValue(sld_rate,-Date),sld_ord_no,itemproduct))