Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
TomBond77
Specialist
Specialist

Error in expression: ')' expected

Hi experts

I have the following formula. There seems to be a ')' missing. I don't see where this might be the case?

Sum({$<Month={'$(=(month(today())))'}>}
([Quantity Total Stock] * ( Distinct TOTAL <Material> ValStockValue)) / ( Distinct TOTAL <Material> [Quantity Total Stock]))

Can you please help?

Thanks

Tom

1 Reply
JuanGerardo
Partner - Specialist
Partner - Specialist

Hi @TomBond77, you are using wrongly the aggregation function. Distinct and TOTAL modifiers can only be used once. I am not sure if you are trying to use more aggregation functions or a special calculation inside the Sum. For example, this should be syntactically correct but I think this is not what you want:

Sum(
	{$<Month={'$(=(month(today())))'}>}
	Distinct TOTAL <Material>
	([Quantity Total Stock] * ValStockValue)
	/ 
	[Quantity Total Stock]
	)

JG