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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Nested IF Statement in Gauge Chart

Hello!  Something is wrong with my formula in red text...

=num(If(Region = 'NA', sum({$<Term={'Actuals'}>}[Total Value])/[NA Target],
          If(Region = 'ASIA', sum({$<Term = {'Actuals'}>} [Total Value])/[Asia Target],
                        Sum({$<Term = {'Actuals'}>} [Total Value])/([NA Target] + [Asia Target]))),'#,###.0%')

Below statement did not work...Instead of dividing Total Value  against Asia Target, it calculates against NA+Asia Target which is not the goal....

Note : Asia and NA Target came from Input box

My objectives are :

1. If I select the NA in region object, this will calculate the Total actuals in NA / NA Target -  

             Note :  there is no problem

2.. If I select the Asia in region object, this will calculate the Total actuals in Asia / Asia Target

               Note :  It doesn't work...  Instead of dividing Total Value against Asia Target, it calculates against NA+Asia Target

3. If I select both NA and Asia, this will calculate the Total actuals in Asia and NA / Asia Target + NA Target -

                  Note : ok no rpoblem

Pls. help...

Tks.

0 Replies