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

Sum Value Set when Data not select

I want to sum Amount but data in set whit condition

condition is :

1. if Assignment_BSAD have (*) Clearing date = Text_BASD 

2. Clearing date Between MasterDate or MasterDate-7

3. Document Type_BSAD = 'R1'

 

Sum({<[Clearing date_BSAD]={"(=MasterDate1-6)$=< (If(right([Assignment_BSAD],1) = '*', Date(Date#(Right([Text_BSAD],8),'D/M/YY'),'DD/MM/YYYY') ,[Clearing date_BSAD])<=$(=MasterDate1)"},[Document Type_BSAD] = {'R1'}>} [Amount in LC_BSAD])

 

Thanks for the help

Groy

Ikoonkoy_0-1659079392001.png

 

1 Reply
sidhiq91
Specialist II
Specialist II

@Ikoonkoy  I would suggest you to create a new_date in the load script Editor first, something like below:

if(right([Assignment_BSAD]),1)='*',Date(Date#([Text_BSAD],'D/M/YY'),'MM/DD/YYYY'),Date(Date#([Clearing date_BSAD],'YYYY-MM-DD'),'MM/DD/YYYY')) as New_date

Then in the front end you can write the below expression.

Sum( {<[Document Type_BSAD] = {'R1'},[Clearing date_BSAD]={">$(=Date(Max(New_date)-7,'MM/DD/YYYY'))<$(=Max(New_date))"}>}[Amount in LC_BSAD])

You can change the date format as per your requirment.

Also, please let me know if my understanding is right and if this solution has helped you.