Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to ask how I can select only one value in qlikview?
I have for example one employer but registered in two company in the same month .
I already have some condition in set analysis
Count({$<_TransType={'CONTRACT'},_YearMonth={'$(vCurrentMonth)'},Month=,Year=,[Month AR]=>} DISTINCT %COMPANY_NUMBER)
Does this selection one value from Listbox then you may look this. or can you describe more
please post some sample data/ app to explain clearly the problem and expected output.
QlikCommunity Tip: How to get answers to your post?
dear,
while loading the data in qvd, there are two row for same employer in same month and same year,
I want to select only one value ,according to the expression which I posted earlier with distinct it's not worked because I have two different companies.
So is it like below
Employer,year,month,Company
A,2016,1,ABC
A,2016,1,XYZ
On what basis would you want to drop a row?
I have this key, it's concatenated of Employer no, Company no, branch no and last value is registration start date , I want to select the max number or registration start date for each Employer
and with certain condition like this :
Count({$<_TransType={'CONTRACT'},_YearMonth={'$(vCurrentMonth)'},Month=,Year=,[Month AR]=>} DISTINCT %COMPANY_NUMBER)
by this expression I get two ,but I want only one value (according the max value of registration start date)
Dear Maeda,
Distinct Keyword used to return only distinct values and it checks/compare all the columns (fields) data if you are loading more than one field. Means it check/compare whole row data with another data if there is any one change it will return you the value.
For clear understanding, example is given below
Example 1 with Distinct Keyword Output
----
Input | |
Emp Name | Company |
Ishfaque | ABC |
Ishfaque | XYZ |
Output with Distinct Keyword | |
Emp Name | Company |
Ishfaque | ABC |
Ishfaque | XYZ |
----
Example 2 with Distinct Keyword Output
----
Input | |
Emp Name | Company |
Ishfaque | ABC |
Ishfaque | ABC |
Output with Distinct Keyword | |
Emp Name | Company |
Ishfaque | ABC |
Kind regards,
Ishfaque Ahmed
I understand distinct but in my expression I need to add some thing like max or aggr but how I write them in my example?!
then try
Load Distinct Key,
MAX(Registration_Date) as RegistrationDate
FROM YOURSOURCE
GROUP BY Key,remainingfield1,remainingfield2.....and so on
I will apply this but in this way, I have to write group by
let me try and then I will post the result of this solution
regards;