Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to use a flag to seperate online sales from direct sales?

I have a Sales_Header table with a field called WebsiteOrderFlag. -1 identifies sales through website and 0 identifies sales through a salesperson. I would like to separate online sales using a flag and then add OnlineSales as one of the Sales Representative in the SalesPerson table to show total sales by each salesperson and total sales through the website. Could anyone please help? Thanks

5 Replies
Not applicable
Author

i know i can use set analysis but i would like to learn how to use flags in qlikview.

Not applicable
Author

Does the sales table you are loading have a salesperson_ID in it?  If so, do you have a code for an OnlineSales member?  If so, I would add in if statement in your load like =If (WebsiteOrderFlag =-1, then SalesPersonID, 999) where 999 is the code for your OnlineSales person.

Then when you run your load statement and your sales person dimension builds, they should join and you should be able to get sales by sales person

Not applicable
Author

all the sales are associated with a RegionID and different SalesPerson have different RegionID assigned to them. So, basically i need to override all the online sales for which different SalesPerson are being credited. For example, for RegionID 5, there is both online sales and direct sales through SalesPeronID 8521. So, if RegionID 5 has total sales of $1000, $800 is through SalesPeronID 8521  and the remaining $200 is through OnlineSales.

Not applicable
Author

i used the intevalmatch fucntion to match intervals and then did a left join with my Sales_Header to get in the SalesPeronID in the Sales_Header table. Now i am going to create another field called OrderType and assign a SalesPersonID to online sales. If order type is direct sales will be credited to sales representative, otherwise website will be credited. Simple!!!!

javiervicente
Contributor
Contributor

You have the example,to me it was not so simple