4 Replies Latest reply: Oct 29, 2015 2:50 AM by Suphanya Phatthawaro

# Compare 2 value with expression

Dear Expert

I have a problem in expression. I want to get Rebate% using summary sales amount of Parent Customer. If selected 1 Parent Customer result of Rebate% Correct but when Parent Customer selected more than 1 or non select it then result incorrect. I was attached part of data in qvw file. I have been use IntervalMacth function but it not dynamic when select month or year.

• ###### Re: Compare 2 value with expression

I don't see any use of the intervalmatch function in your qlikview document. Anyway, if you want intervals to be match per month,year then you need to use the extended intervalmatch syntax and add the month and year fields as keys on which the intervals should be matched. You can find some examples with this search: https://community.qlik.com/search.jspa?q=intervalmatch+extended+syntax

• ###### Re: Compare 2 value with expression

I don't use IntervalMath because I think it use static value to matching. May be I went wrong.

Now I can solved this by expression. Like this

Only({\$<No = p({\$<[Sale Volume From]={"=Sum(LocalAmount)>= [Sale Volume From]"}, [Sale Volume To]={"=Sum(LocalAmount)<= [Sale Volume To]"}>} No)>} [Rebate %])

See attached document for details.

Thanks.

Suphanya

• ###### Re: Compare 2 value with expression

Hi,

I have 2 columns in one table as CreationMonth and Completionmonth.

I want to compare sales between these 2 months in a chart.

I took these 2 as dimensions and count of sales as expression.

in x-axis, month dimensions are shown 2 times  as

jan,jan,feb feb.

how can I show just months irrespective of createdmonth or completedmonth as dimension, pls help!

• ###### Re: Compare 2 value with expression

Hi Srikanth Rokkam,

Can you share your sample document?