Oracle Analytics

Get Involved. Join the Conversation.

Topic

    Wilbert Poeliejoe
    When using the Timestampdiff result is attribute- How to...
    Topic posted August 8, 2019 by Wilbert Poeliejoe, last edited September 11, 2019, tagged Analysis 
    47 Views, 3 Comments
    Title:
    When using the Timestampdiff result is attribute- How to turn into metric?
    Summary:
    The result of a calculation in DV with TImestampdiff the result is an Attribute. Can't be swiched to Measure.
    Content:

    When creating a calculation to calculate e.g. the current age of a person by using:

    TIMESTAMPDIFF(SQL_TSI_YEAR, XSA('weblogic'.'Workforce Management - Worker Assignment Real Time')."Columns"."Person Date of Birth", CURRENT_DATE)

    the result is marked as Attribute. When using the 'treat as' the symbol to the calculation is not changing from A to #. The problem then is when you want to drag the calculated item into the '# Values' section of a visualization it is not allowed.

    Any suggestions to work around that?

     

    Version:
    105.3

    Comment

     

    • Wilbert Poeliejoe

      Some further test done.

      Using the the same calculation as part of a dataflow allows to mark the result as measure.

    • Philippe Lions

      Hello Wilbert, to have it show as a measure you need to explicitly set an aggregation rule in the calc. Typically Avg in this case, but could be anything else

      See the picture below with the formula. In this case, the object shows as a metric. You need to be aware of the level of details you bring in your viz, as OAC will aggregate the calc with that rule for the detail grain you have in your query. Let me know if not what you needed

      thanks

      Philippe