Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If Statements

Hi Guys,

help me with the If statement ....I have salespersons in a chart with months so I want to see how 1 sales person is performing against other salespeople in each month

Thanks

1 Solution

Accepted Solutions
ToniKautto
Employee
Employee

The answer to that question depends on the dimensionality of the calculation. If the Sales person is not in the dimensions, then you can find and compare the persons with IF statements.

The reason for this is that data grouped over for example Month=Jan will have values for both Adam and Bob, and there for you can find these with an IF statement.

2014-05-22 14_50_33-QlikView x64 - [C__Users_tko_Documents___slask_sales comparison.qvw_].jpg

If you instead have the SalesPerson as a dimension, the grouping will be different. In a data group with Month=Jan and SalesPerson=Adam, there for example is no data related to the SalesPerson=Bob. An IF statement looking for Bob's data will therefore not find any matches and the result will be empty. In this case the sum is 0, since a sum of nothing is 0.

2014-05-22 14_57_39-QlikView x64 - [C__Users_tko_Documents___slask_sales comparison.qvw_].jpg

View solution in original post

10 Replies
senpradip007
Specialist III
Specialist III

You can create two Alternate State. With these you can create a comperative study of two sales persons.

Not applicable
Author

please explain in more detail, can you please give an example

senpradip007
Specialist III
Specialist III

PFA

tresesco
MVP
MVP

Have a look at trellis (dimension tab). Take two dimnesions, Month and SalesPerson.

senpradip007
Specialist III
Specialist III

Please find the updated one.

PradeepReddy
Specialist II
Specialist II

Refer the default QlikView examples provided during the installation.

Dashboard Name :  "What is New in QlikView11"

Report name  : "Product Grouping"

ToniKautto
Employee
Employee

There are several ways to make the comparison of sales persons. The solution depends a bit on your data model and what the presentation requirements are.

The calculation it self should be possible to do without IF statements. For example with the Alternate States example or my set analysis based example.

A good way to get solution inspiration is to explore the demo site and see if you can find something that looks like the application you are trying to construct.

Qlik Demos: See QlikView in Action

Not applicable
Author

I have tried other methods they work fine, I just want to know how to use it in an if statement, eg. in my if statement i want to focus on a specific SalesPerson, (if the SalespersonName('Palesa') then show her Sales against other sales people else show all the sales)..... How can i write that statement in my expression

ToniKautto
Employee
Employee

The answer to that question depends on the dimensionality of the calculation. If the Sales person is not in the dimensions, then you can find and compare the persons with IF statements.

The reason for this is that data grouped over for example Month=Jan will have values for both Adam and Bob, and there for you can find these with an IF statement.

2014-05-22 14_50_33-QlikView x64 - [C__Users_tko_Documents___slask_sales comparison.qvw_].jpg

If you instead have the SalesPerson as a dimension, the grouping will be different. In a data group with Month=Jan and SalesPerson=Adam, there for example is no data related to the SalesPerson=Bob. An IF statement looking for Bob's data will therefore not find any matches and the result will be empty. In this case the sum is 0, since a sum of nothing is 0.

2014-05-22 14_57_39-QlikView x64 - [C__Users_tko_Documents___slask_sales comparison.qvw_].jpg

View solution in original post