Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
swiftfahad
Contributor III
Contributor III

Expression on the basis of other expression

Hi all,

I have an expression in the pivot table and labeled it as max_date.

now I want to write

=Sum({<income_date=[max_date]}>}AMOUNT)

mean only amount of those are sum whose invoice_date is same as the date return in previous expression of the same table.

but it gives formatting error (little red mark) plz guide me for correct syntax.

thanks

14 Replies
swiftfahad
Contributor III
Contributor III
Author

I already try this bro what is happening is(

My table has dimension customer_id and this expression show 0.00  when no selection done

and when I click on any particular customer, variable solution shows result)

so i can not adopt that solution because it is not showing total sum of all customer i need to select specific customer to see customer amount.

Kushal_Chawda

create variable  vMaxDate on front end with below expression

=date(max(aggr(max({$<inv_period_date={"<=$(v_userdate)"}>}invoice_date),customer_id),'dd/mmm/yyyy')



Now you can use below expression


=Sum( { <income_date = {"$(=vMaxDate )"} >}AMOUNT)


or


=Sum( { <income_date = {"$(vMaxDate )"} >}AMOUNT)

swiftfahad
Contributor III
Contributor III
Author

All solutions are working and returning data but when I click on single customer not showing value when no field is selected plz check the attached file

Kushal_Chawda

see attached

swiftfahad
Contributor III
Contributor III
Author

thanks for your solution bro. but its not giving proper result....only few customer is displaying in table what you have done....

you may change my expressions and provide any other solution for achieving what I want as you now know my requirement and also have ERD.