Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

Error:Garbage after expression

Hi, i´m just trying to execute a script related to chart visualization, but doesn´t work and shows "error Garbageafter expression ','

If(ValueList ('Actuals Up To Budget','Actuals Below Budget','Actuals Above Budget')='Actuals Up To Budget',
(RangeMin(Sum(Budget)-Sum(Actuals),0))/sum(Budget)),

If(ValueList ('Actuals Up To Budget','Actuals Below Budget','Actuals Above Budget')='Actuals Below Budget',
num((RangeMax(sum(Budget)-sum(Actuals),0))/sum(Budget),'$#,##0.00;-$#,##0.00'),
(RangeMax(Sum(Actuals)-Sum(Budget),0))/sum(Budget))

The most annoynig thing is each If clauses work, but they don´t when working together

 

Thanks for your help

3 Replies
Highlighted

Try this

If(ValueList('Actuals Up To Budget', 'Actuals Below Budget', 'Actuals Above Budget') = 'Actuals Up To Budget',

(RangeMin(Sum(Budget) - Sum(Actuals), 0))/Sum(Budget),

If(ValueList('Actuals Up To Budget', 'Actuals Below Budget', 'Actuals Above Budget') = 'Actuals Below Budget',

Num((RangeMax(Sum(Budget) - Sum(Actuals), 0))/Sum(Budget), '$#,##0.00;-$#,##0.00'),

(RangeMax(Sum(Actuals)-Sum(Budget),0))/Sum(Budget)))
Highlighted
Contributor
Contributor

OK, it´s fine, thank you so much, greetings from Spain

Highlighted

Awesome 🙂