Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Why will the count function not return a result when a variable referring to a column is used as the parameter?
Loan_listing:
LOAD
LOAN_NUMBER,
PRODUCT,
PROD_DESC,
CURRENCY as loan_currency,
Evaluate(AMOUNT) as loan_amt,
'Loans' as Data
FROM
[parsed parameters\loanlisting.qvx]
(qvx);
let name = FieldName(1, 'Loan_listing');
let nom = count(FieldName(1, 'Loan_listing'));
why is nom always empty? shouldn't it have the count of LOAN_NUMBER?
 HirisH_V7
		
			HirisH_V7
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Count and Sum will not work directly. we need use it like this,
Data_New:
 Load
 Count(YourField) as count
 Resident Data Group By OtherField or currentField;
Then you need to call that count field into a , let variable using peek.
 HirisH_V7
		
			HirisH_V7
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try using this,
let nom = FieldValuecount(FieldName(1, 'Loan_listing'));
-Hirish
 Sergey_Shuklin
		
			Sergey_Shuklin
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello!
Try this functions:
LET nom = NoOfRows('Loan_listing') //for all rows
LET nom = FieldValueCount('LOAN_NUMBER') //for distinct values of the field
 HirisH_V7
		
			HirisH_V7
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Bro, 'NoOfRows' it will not be allowed prior to Fieldname Function.
 Sergey_Shuklin
		
			Sergey_Shuklin
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello!
I didn't use it with Fieldname() function.
 
					
				
		
Your answer works but why won't click accept fieldname() inside of count?
 HirisH_V7
		
			HirisH_V7
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Yup! But he wants it with specified field.
 HirisH_V7
		
			HirisH_V7
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Count and Sum will not work directly. we need use it like this,
Data_New:
 Load
 Count(YourField) as count
 Resident Data Group By OtherField or currentField;
Then you need to call that count field into a , let variable using peek.
