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: 
Anonymous
Not applicable

Set analysis, equal to another field

Hi!

I'm trying to sum "Budget_cost" for projects that in the same table have "Rev_no" equal to field called "Rev_no_actual" in another table.

I thought it would look like this but it doesn't work. I get 0,00 as result.

Sum({$<Rev_no={'Rev_no_actual'}>}Budget_cost)

Do anyone have any suggestion?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Set analysis basically operates on field values, not on record level.

If you need a record based comparison, use

=Sum( If( Rev_no=  Rev_no_actual ,Budget_cost))


If you want to speed up calculation, create a flag in the script, then use the flag in your set expression.

View solution in original post

2 Replies
swuehl
MVP
MVP

Set analysis basically operates on field values, not on record level.

If you need a record based comparison, use

=Sum( If( Rev_no=  Rev_no_actual ,Budget_cost))


If you want to speed up calculation, create a flag in the script, then use the flag in your set expression.

Anonymous
Not applicable
Author

Excellent! Thanks!!