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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
raceberos
Partner - Contributor III
Partner - Contributor III

HELP in SUM

Good day to all

i got this data,

what i want to do is if i filter the Reference to 2 and the


sum of amount must be 300 coz of reference 1+2 = Amount 100+200

i use this formula  " Sum({<Reference={"<=$(=Max(Reference))"}>}[Amount]) "

                              

i got it right if i select in the filter 1 and 2 but it doest work if i select in the filter only the 2

ReferenceAmount
1100
2200
3300
4400

does anyone have an idea how to compute it

thanks...

6 Replies
tresB
Champion III
Champion III

Try like:

Sum({<Reference, HSL={"$(=Max(Reference))"}>}[Amount])

raceberos
Partner - Contributor III
Partner - Contributor III
Author

Hi there mate thanks for the help but it doesn't work as expected you coz if i filter the referece it always give me 1000 as sum of amount...

Thanks

tresB
Champion III
Champion III

Do you need to check it in the chart or in KPI object? And I don't see a field called HSL ?

tresB
Champion III
Champion III

I guess if it is the same field Reference, you could try:

Sum({<Reference={"<=$(=Max(Reference))"}>}[Amount])

raceberos
Partner - Contributor III
Partner - Contributor III
Author

oww sorry for that i posted the wrong formula

"Sum({<Reference={"$(<=Max(Reference))"}>}[Amount])"  please

replace the HSL to Reference.

thanks for that.

tresB
Champion III
Champion III

Try the expression I showed above. Positioning of '<=' needs to be corrected.