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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
rickrogers
Contributor II
Contributor II

Exclude elements H with function

I need help nesting my e() functions on Line 2 and Line 4 so the Elements ‘H’ are excluded.

 

Sum({$<[Metal] ={'Li','Na' }                                         // Line 1

 

,(E({1<[Elements] = {'H'}>}))>}                                   // Line 2

 

+1<[Metal]={'Mg'}                                                           // Line 3

 

,(E({1<[ Elements] = {'H'}>}))>                                    // Line 4

 

}Quantities))                                                                      // Line 5

 

Can you help without changing Line 1 or Line 3?

1 Solution

Accepted Solutions
Saravanan_Desingh

Try something like this,

=Sum({$<[Metal] ={'Li','Na' }                                      // Line 1
,Elements=E({1<[Elements] = {'H'}>})>                              // Line 2
+1<[Metal]={'Mg'}                                                  // Line 3
,Elements=E({1<[Elements] = {'H'}>})>                              // Line 4
}Quantities)                                                       // Line 5

View solution in original post

1 Reply
Saravanan_Desingh

Try something like this,

=Sum({$<[Metal] ={'Li','Na' }                                      // Line 1
,Elements=E({1<[Elements] = {'H'}>})>                              // Line 2
+1<[Metal]={'Mg'}                                                  // Line 3
,Elements=E({1<[Elements] = {'H'}>})>                              // Line 4
}Quantities)                                                       // Line 5