Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
bhuprakash
Creator II
Creator II

Pivot customer id counts

Dear All,

I am not able to get sales territory code wise customer id count in the second table.

In the second table, i want the data like below -

Dist_TSH | STC | StCode | StateName | Count of Customer ID

Dist_TSH -> Name of Active SIO

STC ->  Sales territory code in which active SIO working

STCode -> State code in which active SIO working

StateName -> Name of State in which active SIO working


Please help me to get this data so that after this I can add this data in my first table.


10 Replies
Anil_Babu_Samineni

Is this you are expecting?

=Dist_TSH & '|' & STC & '|' & StCode & '|' &  StateName


Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
bhuprakash
Creator II
Creator II
Author

Dear Anil,

Below is the required result-

     

Dist_TSHSTCStCodeStateNameDistributor Counts
ABHINANDAN KUMARBR-T11BRBihar36
Anupam DasWB-1-T18WBWest Bengal7
BALJINDER SINGHHR-2-T3HRHaryana36
Bapan GhoshWB-1-T20WBWest Bengal10
Biplab ManikWB-1-T12WBWest Bengal7
D KISHORETNK-6-T2TNTamil Nadu3
DEEPAK BRAHMA NAND SHARMAMP-3-T1MPMadhya Pradesh34
GURPREET SINGHPB-3-T3PBPunjab27
HEMANT VITTHAL MESHRAME-MH-5-T3MHMaharashtra7
JASPREET SINGHPB-5-T2PBPunjab82
KAMALDEEP SINGHPB-3-T4PBPunjab94
KULDIPKUMAR PATELGJ-1-T17GJGujarat29
MANISH PRAJAPATIGJ-1-T1GJGujarat26
Maruri   Rakashekar ReddyAP-1-T9APAndhra Pradesh36
NIKESH PRAKASHRAO GODBOLEE-MH-1-T3MHMaharashtra57
NITESH KUMARUP-2-T7UPUttar Pradesh22
PANKAJ KUMAR SHARMARJ-T4RJRajasthan67
PARAMPAL SINGHPB-5-T1PBPunjab43
PAWAN KUMARPB-5-T3PBPunjab72
PRAFULLA RAJENDRARAO SONTAKKEE-MH-6-T2MHMaharashtra21
Proddatur - No Territory  HeadS-AP-2-T3APAndhra Pradesh1
RAGHUVEER SINGHRJ-T6RJRajasthan37
SACHIN JANARAOJI TEWAREE-MH-1-T1MHMaharashtra32
SANJAY MADHUKAR SONAWANEW-MH-3-T3MHMaharashtra12
SANJEET KUMARBR-T6BRBihar48
SHARAD SUBHASRAO PAWALEMH-1-T9MHMaharashtra8
VIKRAMSINH SISODIYAGJ-1-T6GJGujarat50
parthesh
Creator
Creator

Hello,

i have tried to create new table, Please find attached QVW file.

hope that you were looking for same.

let me know in case of you are looking something else.

if your query resolved please dont forget to mark this as correct answer.

!

bhuprakash
Creator II
Creator II
Author

Kindly search the STC code in customer master table. There is a column [Territory Code] kindly search STC code in the column for each employee and get total count of [customer no]

bhuprakash
Creator II
Creator II
Author

Dear Parth,

I dont see the qvw file. how to get it ?

parthesh
Creator
Creator

i have attached it in my reply, i am able to see it may be it will reflect after one or two minute. i have double checked it is there. 🙂

bhuprakash
Creator II
Creator II
Author

Parthesh,

For example, Abhinandan is mapped with 36 distributors. I tell you that how can you find it.

I have mapped territory code (STC) against all employees as you can see above. to get distributor count, just see the distributor code column in customer master table and filter with STC code then you can find distributor count.

parthesh
Creator
Creator

Hello, here i have tried by selecting Abhinandan, and i can see 137 customer attached with him. i dont know how you are getting 36. are you trying with same QVW, same data?

bhuprakash
Creator II
Creator II
Author

Dear Parth,

I have attached file again in starting of the conversation and tried to explain you that how 36 count is coming.