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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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.

Labels (1)
1 Solution

Accepted Solutions
rwunderlich
MVP
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
MVP
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.