May be this
=If(Not vAreAttributesSelected,0, If(vAreAttributesSelected, Count(DISTINCT $(=Replace(vSelectedAttributeNames, ',', '&')))) <=vMaxRowLimit)
QlikViewPerfIssue.qvw 168.0 K
To handle above scenario, I came up with a work around but I am facing issue with IF Condition when we have huge amount of data.
First I would like to give the scenario
below are the variable used in application,
vSelectedAttributeNames = [ContractName],[ContractNumber],[CustomerName],[CustomerNumber],[ProductName],[ProductNumber]
vMaxRowLimit = 50000
vAreAttributesSelected = 1
vTotalRecordsUpperLimit = If(Count(Distinct ProductName) * Count(Distinct CustomerName)>400000, 0,-1)
vMaxRecordsReachedCondition = If(Not vAreAttributesSelected,0, Sum(Aggr(1, $(=If(vAreAttributesSelected, vSelectedAttributeNames, 0)))) <=vMaxRowLimit)
I have added a straight table with calcualted condition and Layout Show Conditon as "If($(vTotalRecordsUpperLimit)=0,0,$(vMaxRecordsReachedCondition))".
I have added a Text object with Layout Show Conditon as "Not If($(vTotalRecordsUpperLimit)=0,0,$(vMaxRecordsReachedCondition))".
Please find the attached Zip file for more details.
I am facing issue with below expression,
I have two contracts in the attached QlikView application. one contract has 6 records, In this case, variable vTotalRecordsUpperLimit is assigned with -1 and vMaxRecordsReachedCondition variable assigned with -1 and application is fetching 6 records and displayed.
Second contract has nearly 70 Million records, In this case vTotalRecordsUpperLimit variable is assigned with 0 and while evaluting expression "If($(vTotalRecordsUpperLimit)=0,0,$(vMaxRecordsReachedCondition))" system is hanged. As vTotalRecordsUpperLimit is 0 it should return 0, but system hanged.
The same is highlighted in the application.I have tried with Pick function also but it resulted the same.
can any one share solution for the specified issue.
QlikViewPerformanceIssue.zip 453.5 K