Jump to content

Using calculated measures for another calculated measure doesn't work


Vovkin

Recommended Posts

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:

  1. number of orders (e.g. value is 74802) 
  2. 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

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • 8 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...