Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
george55
Partner - Creator III
Partner - Creator III

VLookup in Qlik

Hi all,

Would like to do a simple VLookup in Qlik. Situation:

Please see 3 Tables below. Goal: Get Column "Count Weighted". Tried with this formular but get empty values:

Count({$<Status={2}>} RoleName) * Factor_CarType

Thanks for any help

 

CarType  
ID_TypeNameFactor_CarType 
1BMR12.5 
2Tyote10.0 
    
    
    
Quantity 
ID_TypeRoleNameCount 
1A10 
1B500 
2A50 
2B600 
    
    
Pivotable   
StatusRoleNameCountCount Weighted
finishedA60625
 B110012250
Labels (1)
  • SaaS

16 Replies
george55
Partner - Creator III
Partner - Creator III
Author

@edwin: Your last expression worked. Thanks.

Next step: Would like to show a Chart History. The Aggr() Function is good for one aggregated figure, not for a time series. How should Implemed that? Can also open a new thread?

edwin
Master II
Master II

if you want the aggregation by Date and Rolename, just add the date to the aggr:

=aggr(NODISTINCT sum(aggr( count(RoleName), RoleName, ID_Type, Dt)*Factor_CarType), RoleName, Dt)

george55
Partner - Creator III
Partner - Creator III
Author

Does not work. Chart is empty

edwin
Master II
Master II

 
george55
Partner - Creator III
Partner - Creator III
Author

Thanks Edwin.

With you App, did you see the problem below? Have some gaps and believe dont need a muliplicator with the factor anymore. A Sum of the Factor should do it. 

Believe it is not neccsary anymore to 

 

george54_0-1603273793607.png

 

george55
Partner - Creator III
Partner - Creator III
Author

This is the solution:

Sum({$<RoleName={2}>} Factor)

edwin
Master II
Master II

there are two solutions embedded in the QVW i sent you - one copies the Factor to the main fact table so you dont need to look it up.  this was what i suggested the first time so you just need to sum the factor as your transaction records have a unit count = 1 (you dont need the count you just sum the Factor).
2nd solution is if you cant add Factor into your fact table, use the expression with the AGGR function.  your choice and it appears youve made it.