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

Gauge Chart Based on InputBox

Hello!   I need help with my current formula  on ,y gauge chart...

=sum({<Aspect={'Actuals'}>}[Total Value])/[NA Target] where 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

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

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

3.  The formula should work only Actuals under Aspects field...it should not work if I select other aspects

Loopholes in my current formula :

1.   1.  If I select the Asia region, this will calculate the Total revenue for ASIA (when  I want NA) against NA  target

2.    2.  I only want to  get the actuals in the aspect field and should not work in any other aspects.  Currently,  if I select other   aspects (not actuals), this gives me another computation.

I'm not sure if this will work for input boxes for this kind of statement But I really appreciate if you could help me.

Tks.

Inputbox..png

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

Maybe try this?

=If(Region = 'NA', sum({$<Aspect={'Actuals'}>}[Total Value])/[NA Target],

     If(Region = 'ASIA', sum({$<Aspect = {'Actuals'}>} [Total Value])/[Asia Target],

          Sum(${<Aspect = {'Actuals'}>} [Total Value])/([NA Target] + [Asia Target])))

-art

View solution in original post

2 Replies
Not applicable
Author

Hi,

Maybe try this?

=If(Region = 'NA', sum({$<Aspect={'Actuals'}>}[Total Value])/[NA Target],

     If(Region = 'ASIA', sum({$<Aspect = {'Actuals'}>} [Total Value])/[Asia Target],

          Sum(${<Aspect = {'Actuals'}>} [Total Value])/([NA Target] + [Asia Target])))

-art

Anonymous
Not applicable
Author

Thank you, Art...just need  to fix a  slight typo on   the last statement    Sum(${<Aspect = {'Actuals'}>} [Total Value])/([NA Target] + [Asia Target])))   and it works perfectly...

Thanks you, again