Categories
- All Categories
- 5 Oracle Analytics Sharing Center
- 11 Oracle Analytics Lounge
- 194 Oracle Analytics News
- 41 Oracle Analytics Videos
- 15.5K Oracle Analytics Forums
- 6K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 68 Oracle Analytics Trainings
- 14 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
Calculation result type (attribute/measure)

Summary
Calculation result type (attribute/measure)
Content
Hi,
Is there any way to specify calculation result type to be an attribute or a measure?
Thanks,
Alexandr
Answers
-
If you find replies helpful or if you got a complete answer to your question please mark it as closed so others having the same problem can benefit
0 -
It should, as in OBIEE depend on the following:
- If column formula contains only attributes then it's attribute
- If column formula contains a measure then it's a measure
I've tried the two formulas you suggested with the samplefile that is included in DVD, the formula was the following
case when Sum(XSA('weblogic'.'Sample Order Lines')."Columns"."# of Orders" by XSA('weblogic'.'Sample Order Lines')."Columns"."City" ) < 50 then 'A' else 'B' end
In this case the new column was shown as Attribute (maybe because of the two alphabetical values) but wasn't acting as attribute in the Chart until I included the City in the chart itself.
case when Sum(XSA('weblogic'.'Sample Order Lines')."Columns"."# of Orders" by XSA('weblogic'.'Sample Order Lines')."Columns"."City" ) < 50 then 1 else 0 end
In this case the new column was shown as Measure (maybe because of the two numerical values) but wasn't acting as measure in the Chart until I included the City in the chart itself.
I believe that due to the mixture of measures and attributes in the formula, you should use the data flow option.
0 -
Thanks for the answers!
0 -
Example 1:
Add to My Calculations "case when N>100 then 'A' else 'B' end". I`d like to use this as attribute in charts, as X-axis.
Example 2:
Add to My Calculations "case when N>100 then 1 else 0 end". I`d like to use this as measure in charts, as Y-axis.
I know I can add this calculations to data flow or even to SQL.
The question is what My Calculations result type depends on?
0 -
This is correct for data sources and data flow results.
I`d like to do the same for My Calculations results.
0 -
There is no way to force it being attribute vs metrics in the front-end.
Maybe you need to use data-flow component to add it to your dataset appropriately.
What is the measure/attribute that you are having problems with? if you describe it better we could help more efficiently
0 -
Yes,
If you are just uploading a spreadsheet you can change the attribute/measure definition by editing the data source.
If you use Data Flow, then you must include an aggregation step where you can define measure and attributes.
For more info please check https://www.rittmanmead.com/blog/2016/10/data-visualisation-desktop-data-loading-2/
0 -
Thanks for the tip on a calculation containing a measure becomes a measure.
I needed this because I want to subtract two datetimes to get the number of hours between. The only problem is that it became an attribute and I need it to be a measure.
So, here's my formula:
("End Date & Time Date"-"Start Date & Time Date")*1440+("Headcount"*0) [extra sources removed for clarity]
Kind of sad that I have to add Headcount*0, but that's how I solved it. Oracle, we need the ability to control whether it's a measure or an attribute, or you have to somehow be smarter. Subtracting two times almost always should result in a measure.
0 -
Maybe sometimes it needs to be an attribute ... like subtract 1 week from <Event Date> which is date datatype and present as attribute.
Then the resulting column "Event Date LW" can also be used as an attribute.
That said, most of the time, date fields used in calculation formulae result in measures, not attributes <shipment delivery delay in hours/days>.
0 -
This may not be the exact question, but relates to the thread : there is a function you can use to turn a metric into an attribute in DF : Attribute(). See this blog+video giving some backrgound with it :https://twitter.com/philippe_lions/status/765933698663510016
0