Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
siddharthsoam
Partner - Creator II
Partner - Creator II

Currency Comaprision

I have revenue in $. I need to divide this revenue in 3 categories that is tail(<$1 Mn),middle(1-5 Mn) and large(>5 Mn).

My script is as follows

Text(If(Revenue<1,'Tail',If(Revenue>5,'Large','Middle'))) as Account_type

I am comparing revenue with 1 that is a number not in currency format. This is giving me inaccurate results.

How can I compare revenue in currency format.

1 Solution

Accepted Solutions
johnca
Specialist
Specialist

One way is

If(Revenue <= 1,'Tail,

     If(Revenue > 1 And Revenue <= 5, 'Middle',

     'Large'

     )) as Account_type


HTH,

John

View solution in original post

4 Replies
sunny_talwar

Try this

If(Revenue < 1,'Tail',

If(Revenue < 5, 'Middle', 'Large')) as Account_type

johnca
Specialist
Specialist

One way is

If(Revenue <= 1,'Tail,

     If(Revenue > 1 And Revenue <= 5, 'Middle',

     'Large'

     )) as Account_type


HTH,

John

el_aprendiz111
Specialist
Specialist

Hi,

if(Money(Revenue)<1......


or

Would you be able to share a sample with the expected output?

johnca
Specialist
Specialist

You're just too fast for me Sunny 🙂