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

Total Amount till Selected Month & Year

Hi All,

I have calculated Out Standing Amount Expression Till Maximum Month I am getting Correct Value.

Ex: Till September I am Getting Correct Value

If I am Making any Selection On Year & Month It is Showing Wrong Amount...

If I am selecting 2014, June , I want See the Amount up June-2014 Total Amount Value but I am getting incorrect Value...

My Expr: 

=(Sum({<OST_DOC_DT={"<=$(=max(OST_DOC_DT))"},OST_DRCR_FLAG={'C'}>}OST_FC_ADJ_AMT)

-sum({<OST_DOC_DT={"<=$(=max(OST_DOC_DT))"},OST_DRCR_FLAG={'C'}>}OST_FC_ORG_AMT))

+ (Sum({<OST_DOC_DT={"<=$(=max(OST_DOC_DT))"},OST_DRCR_FLAG={'D'}>}OST_FC_ORG_AMT)

-sum({<OST_DOC_DT={"<=$(=max(OST_DOC_DT))"},OST_DRCR_FLAG={'D'}>}OST_FC_ADJ_AMT))

Help me on this...

Regards,

helen

3 Replies
JonnyPoole
Employee
Employee

Your Date filter in the SET MODIFIER is good, but if a user also selects a year and a month the '$' in the SET EXPRESSIONS will include those filters too.   You will have Year=2014 and Month=June and Date <= 2014,June... you'll end up with just just June 2014 dates

So cancel out the Year and Month and any other date selection a user may make from the SET MODIFIER

EX:

change:

Sum({<OST_DOC_DT={"<=$(=max(OST_DOC_DT))"},OST_DRCR_FLAG={'C'}>}OST_FC_ADJ_AMT)

To:

Sum({<OST_DOC_DT={"<=$(=max(OST_DOC_DT))"}, YEAR=,MONTH=, OST_DRCR_FLAG={'C'}>}OST_FC_ADJ_AMT)


Here i added  YEAR= and MONTH=  to drop those selections for this formula where YEAR and MONTH are the field names the user is selecting.


You will have to do this on all 4 piece of your formula

Not applicable
Author

HI,

I have applied Year & Month also in Expression , I am getting In correct data..

From May 2014 to back onwards I am getting Zero...

Regards,

Helen

JonnyPoole
Employee
Employee

Can you post the new expression as well as a screenshot ?  If you can post your QVW even better. Use the 'advanced editor' in your reply to make attachments