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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
clovati
Partner - Creator
Partner - Creator

Bring value from one or another column and then sum the exact values

RegionCol1Col2Col3
REGION1100200100
REGION21005050
   TOTAL (sum)200250150

Hi all.

Col3 >>>> if Col1<=Col2 then Col1 else Col2

How can I have the TOTAL (SUM) in Col3 = 150?

By default IF is applied also to totals and then I obtain 200 as Total in col3.

Thank you ALL

13 Replies
antoniotiman
Master III
Master III

Try GetCurrentField(Group) instead of Region in Aggr()

tyagishaila
Specialist
Specialist

Try it,

Sum(If(Col1<Col2,Col1,Col2)

Anonymous
Not applicable

Hi

Please find attached application

Hope it helps!!

antoniotiman
Master III
Master III

Sum(Aggr(RangeMin(Col1,Col2),$(=GetCurrentField(Gruppo))))