DavidT_UK Posted September 12, 2023 Share Posted September 12, 2023 Hi,I've got an adhoc report that lists orders from suppliers, but it's also listing duplicates (invoicing related). There is an option in custom expressions for this, but it doesn't seem to be working.When I use command CountDistinct("Order Reference", 'Total') I'm getting an 'Aggregate expressions are not allowed in fields; please create a measure if you wish to use an aggregated expression'I've tried it with several of the different options like RowTotal/RowGroup etc but its the same. Thoughts? Link to comment Share on other sites More sharing options...
Mehak Rajkumar Posted September 18, 2023 Share Posted September 18, 2023 Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times. Link to comment Share on other sites More sharing options...
Domenico Donofrio Posted September 18, 2023 Share Posted September 18, 2023 Hello David,as the message is saying, you should try to define a new measure instead of a new field in order to use this calculated field.You can find the measures list at the bottom left of the ad hoc editor and then click on the 3 points to add the new measure with the same expression you have been using already Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now