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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
pgalvezt
Specialist
Specialist

Obtain Total

Hi,

I have to change nums into the fields so I have this:

=Aggr(if(var='1' and codigo='84',7809,if(var='2' and codigo='84',4500000,if (var='2',sum(actual) ,sum(actual1)))),codigo)

So I need to change the cod value (works fine) the problem is that still show the same Total. If a change year for codigo show the total but dissapear the first 2 values.

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Wrap the whole thing in a SUM.

-SUM(

Aggr(if(var='1' and codigo='84',7809,if(var='2' and codigo='84',4500000,if (var='2',sum(actual) ,sum(actual1)))),codigo)

)


-Rob

View solution in original post

4 Replies
Anonymous
Not applicable


could you elaborate may be with screenshots and sample file?

pgalvezt
Specialist
Specialist
Author

I attached sample test with my formula.

Thanks!

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Wrap the whole thing in a SUM.

-SUM(

Aggr(if(var='1' and codigo='84',7809,if(var='2' and codigo='84',4500000,if (var='2',sum(actual) ,sum(actual1)))),codigo)

)


-Rob

pgalvezt
Specialist
Specialist
Author

Thanks Rob.