Vovkin Posted September 23, 2015 Share Posted September 23, 2015 I faced with strange behaviour of usage calculated measures in other measures calcuation. There is an Ad Hoc View, I have 2 tables - `customers` and `orders`. I added 2 calculated measures: number of orders (e.g. value is 74802) and number of unique customers who ordered (e.g. value is 52107). Then I want to add another measure - average number of orders per customer, so I use next formula in formula builder: "Number of orders" / "Number of ordering customers" because I already have 2 calculated values, and just use them in this simple calculation. But, somehow result is unexpected - by default formula builder set "Sum" in summary calculation, and result is 6.75, when I change it to "None", which looks correct for me, I have no value at all. This looks strange, because I expect that value will be 1.4355 (result of 74802 / 52107). So I have a feeling that Jaspersoft works incorrect if I use other calculated measures in formula. I tried the same for other calculations with different calculated measures and result was unexpected there too. Didn't expect problems in such a simple case, how to do what I need? Thanks! Link to comment Share on other sites More sharing options...
elizam Posted September 23, 2015 Share Posted September 23, 2015 Try Average as your summary function. Link to comment Share on other sites More sharing options...
Vovkin Posted September 29, 2015 Author Share Posted September 29, 2015 Unfortunatelly it doesn't help Link to comment Share on other sites More sharing options...
rcrom Posted June 23, 2016 Share Posted June 23, 2016 Did you ever find out an answer? I have the same behaviour and the only way I found to get around this was by adding the equations from the calculated fields into the new equation. 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