Hi D. ,
we resolved that issue mapping into a new Universe the ci_probe.value tables (CI_UNV).
creating an alias of this and link by probe_id.
Create two metrics on the owner subject is propedeutical : Sum(X) and Sum(Y).
Then you can map on new measure object on CI_UNV the Probe_id of X and Probe_id of Y with aggr=none tag, filtering for probe id the first on the native table, and the second on the alias one.
Then you have to manage zero cases…
Then create Metric.
Anyway this is the sql we generate.
select
Ci_probe_value.probe_value/Alias.probe_value
where
ci_probe_value.probe_id= x id and Alias.probe_id = Y id
I hope could be an help for you.
We have a number of complex metrics that would be created as multiple data providers (or multiple Selects within 1 data provider) in a regular BO reporting universe. Such as
(table1.fieldA where Flag = N + table2.FieldD where product = X) / table1.fieldB
What I’m seeing from this thread is that the only way to handle this is by creating a universe off the CI tables. Is this correct?
I haven’t seen any info on 6.5. Are there any new features for handling complex metrics?
It seems to be the only way, alternately to handle DB objects such as views , materialyzed view that should contain precalculating measures: i advise these last solutions when complex metrics need to be sliced!
I am trying to get the % working as you explained but the values I am getting are not right. Can you elaborate on the universe design a little bit for me.
Let me explain what I did.
I have 2 metrics; one for count of cases completed (probe.id = 10) and one for count of total cases (probe.id = 11) and need to get the % of cases completed.
I created a universe that has ci_probe_value table and I created its Alias.
Joined the 2 tables on probe_id (should it be 1-1 or m-m ?) and place a self join on period_date on one of the tables. (This self join is just like a normal AF self join on a date value).
Created an object on probe_value object from one table and used probe_id = 10 in the where clause. This is a dimension object. SHould i make it a measure and apply an aggregation on this??
Similarly, created an object from the aliased table for probe_id=11
Created a measure object with AGGR=NONE and its select contains
(obj1/obj2)*100
The values that I am getting absolutely dont make any sense what so ever. Please let me know if i am missing an important steps somewhere.
Hi
This topic is really interesting. I also encountered a situation wherein i needed a percentage value based on the measures in my universe. My goal is to create a speedometer based on percentage so the boundary would be 0 to 1. I have a question though, why do you need to create an alias on the ci_probe.value and create a self join? What significance does it make, can you not call the 2 ci_probe id’s (queries) in one ci_table and all the records would be pulled? i am just curious.
can someone please explain this method a bit further or link to somewhere I can find more details? I really need to get this working, but I can’t get the percentage working correctly, specially when it comes to calculating the percentage for sliced metrics…