Skip to main content
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
tresesco
MVP
MVP

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

tresesco
MVP
MVP

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

tresesco
MVP
MVP

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.

tresesco
MVP
MVP

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