Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

current week on aggr formula

Hello there!

Can someone help me modify my formula in such a way that it can reflect the current week that I need.

below is my formula

=Sum(Aggr(QTY,LOTS))

I have tried this but it is giving me a zero (0) result

Sum({<Fiscal_Week = {"$(=MaxString(Fiscal_Week))"}>}Aggr(QTY,LOTS))


thanks

16 Replies
yasmeenk
Partner - Creator
Partner - Creator

Hi,

Please check the attached file.

Is this what you are trying to get?

its_anandrjs

What output you need means for which row and week data in output.

dinuwanbr
Creator III
Creator III

Hi,

PFA

Rgds,

Tharindu

Anonymous
Not applicable
Author

Hi Yasmeen,

You nailed it right!  this is what I am looking for...

thank you so much!

yasmeenk
Partner - Creator
Partner - Creator

You're welcome

Anonymous
Not applicable
Author

Hi Yas,

follow up question please.  I wanted to get the percentage of lots based on hours criteria.

how do i modify this formula in order to get the  percent per hour.

=Count( {<Fiscal_Week = {$(=Max({<CRITERIA={"<6 HRS"}>}Fiscal_Week))}>} LotID)/Count({<Fiscal_Week = {"$(=MaxString(Fiscal_Week))"}>}LotID)

base on this data(in pivot expression)

 

CRITERIA          <6 HRS          6-12 HRS          >24 HRS          OTHERS       TOTAL

# OF LOTS          346                 535                     290                 375               1546

PERCENT            22%               35%                    19%                24%               100%

where % is #OF LOTS over TOTAL     

thanks in advance

Anonymous
Not applicable
Author

Hi Yas and all,

found it! a stroke of luck for me

this formula gives me the right answer I'm looking for. The TOTAL is the key.

=Count( {<Fiscal_Week = {$(=Max({<CurMainQty={">0"}>}Fiscal_Week))}>} LotID) / Count(TOTAL {<Fiscal_Week = {$(=Max({<CurMainQty={">0"}>}Fiscal_Week))}>} LotID)