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: 
sona_sa
Creator II
Creator II

Expression Help

Hi ,

Scenario is like this,

My Expression =

If(Year = '2014',

((sum({$<Year = {2014},MONTH = {"<=$(vMonth)"},HalfYear,Quarter,Month>} SALES_AMT_USD/1000000)-sum({$<Year = {2014},MONTH = {"<=$(vMonth)"},HalfYear,Quarter,Month>} AOP_Value/1000000))

/sum({$<Year = {2014},MONTH = {"<=$(vMonth)"},HalfYear,Quarter,Month>} AOP_Value/1000000)*100),

((sum({$<Year={$(=max(Year))},MONTH={'<=$(=Max(MONTH))',Quarter,HalfYear, Month}>} SALES_AMT_USD/1000000)-sum({$<Year={$(=max(Year))},MONTH={'<=$(=Max(MONTH))',Quarter,HalfYear, Month}>} AOP_Value/1000000))

/sum({$<Year={$(=max(Year))},MONTH={'<=$(=Max(MONTH))',Quarter,HalfYear, Month}>} AOP_Value/1000000)*100))

By using this expression I am getting -100 value, So I want to replace -100 with 0.


Thanks

2 Replies
MK_QSL
MVP
MVP

IF(YourExpression < 0, 0, YourExpression)

Anonymous
Not applicable

did you check your Expression step by step

might it be that the single part are correct?

(0-100)/(100*100) results in -100

SALES_AMT_USD does return correct data with the specified set Analysis Options?