Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have following issue and would appreciate any advice.
My data model is quite complex so I tried to translate it to a more simple scenario.
I have several cars (field 'car') in my database.
Each car can (but does not need to) have special products (field 'product').
These products can be categorized; so each product is either a "main_feature" or an "additional_feature" (field 'product_type', values = main feature or additional feature).
I want to calculate and display the following variable (the average money I make with additional feature for every sold main feature):
Sum({$<product_type={'additional_feature'}>} Price)/Count({$<product_type={'main_feature'}>} feature_ID)
This is working fine, but I want to display the result for each additional_feature. When I select the dimension 'product', it just shows the total value.
Is this clear? Does anyone know how I would need to modify my variable?
Thanks and KR
You need to make your expressions independent from any or certain selections. This could be done with adjusted identifier and qualifier like:
Sum(1 {$<product_type={'additional_feature'}>} TOTAL Price)
A good explanation will you find here: Set Analysis: syntaxes, examples
- Marcus
Hi, does nobody have an idea?
Thanks!
Try:
Sum({$<product_type={'additional_feature'}>} Price)/Count({$<product =,product_type={'main_feature'}>} feature_ID)
Your requirement is not really clear. I suggest that you post a sample qvw containing representative data and your expected results.
You need to make your expressions independent from any or certain selections. This could be done with adjusted identifier and qualifier like:
Sum(1 {$<product_type={'additional_feature'}>} TOTAL Price)
A good explanation will you find here: Set Analysis: syntaxes, examples
- Marcus