Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
Customers, Partners & Luminaries only: You're invited to a Data Analytics Roadmap session. Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

Concatenate If Statements to Expressions

Hi guys,

I am currently trying to set up a formula, that helps me classify customers by good, neutral, bad as follows:

=if(

([OfflineSales2018]>[OfflineSales2017]

and

[OnlineSales2018]>[OnlineSales2017]

and

([OfflinePositions2018]>[OfflinePositions2017]

and

[OnlinePositions2018]>[OnlinePositions2017]

, 'good')

if(

([OfflineSales2018]>[OfflineSales2017]

and

[OnlineSales2018]>[OnlineSales2017]

and

([OfflinePositions2018]<[OfflinePositions2017]

and

[OnlinePositions2018]<[OnlinePositions2017]

, 'neutral')

if(

([OfflineSales2018]<[OfflineSales2017]

and

[OnlineSales2018]<[OnlineSales2017]

and

([OfflinePositions2018]<[OfflinePositions2017]

and

[OnlinePositions2018]<[OnlinePositions2017]

, 'bad')

Could anyone please help me solve this riddle and make it work exactly that way? Thank you 🙂

Best regards

Nes

1 Solution

Accepted Solutions
Highlighted
Champion
Champion

Hi,

try this:

=if(

[OfflineSales2018]>[OfflineSales2017]

and

[OnlineSales2018]>[OnlineSales2017]

and

[OfflinePositions2018]>[OfflinePositions2017]

and

[OnlinePositions2018]>[OnlinePositions2017]

, 'good',

if(

[OfflineSales2018]>[OfflineSales2017]

and

[OnlineSales2018]>[OnlineSales2017]

and

[OfflinePositions2018]<[OfflinePositions2017]

and

[OnlinePositions2018]<[OnlinePositions2017]

, 'neutral',

if(

[OfflineSales2018]<[OfflineSales2017]

and

[OnlineSales2018]<[OnlineSales2017]

and

[OfflinePositions2018]<[OfflinePositions2017]

and

[OnlinePositions2018]<[OnlinePositions2017]

, 'bad')))

View solution in original post

3 Replies
Highlighted
Champion
Champion

Hi,

try this:

=if(

[OfflineSales2018]>[OfflineSales2017]

and

[OnlineSales2018]>[OnlineSales2017]

and

[OfflinePositions2018]>[OfflinePositions2017]

and

[OnlinePositions2018]>[OnlinePositions2017]

, 'good',

if(

[OfflineSales2018]>[OfflineSales2017]

and

[OnlineSales2018]>[OnlineSales2017]

and

[OfflinePositions2018]<[OfflinePositions2017]

and

[OnlinePositions2018]<[OnlinePositions2017]

, 'neutral',

if(

[OfflineSales2018]<[OfflineSales2017]

and

[OnlineSales2018]<[OnlineSales2017]

and

[OfflinePositions2018]<[OfflinePositions2017]

and

[OnlinePositions2018]<[OnlinePositions2017]

, 'bad')))

View solution in original post

Highlighted
Contributor III
Contributor III

Thank you so much, Youssef! It worked perfectly. 🙂

Highlighted
Champion
Champion

You're welcome

good luck