Oracle Fusion Data Intelligence

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

How can you change a dimension into a fact?

Accepted answer
40
Views
6
Comments

When subtracting 2 dates, the result is a number; however, it creates an attribute. Here is the formula:

TIMESTAMPDIFF(SQL_TSI_DAY, {date 1},{date2})

How can I change it to a fact?

I'm using NetSuite Analytics Warehouse.

Best Answers

Answers

  • Phani Srikantam
    Phani Srikantam Rank 3 - Community Apprentice

    Hi @User_F2RD3,

    you have to add an aggregate function to change the column from attribute to metric

  • User_F2RD3
    User_F2RD3 Rank 4 - Community Specialist

    When I add it to a column, I don't get the Aggregate function.

    Screenshot 2025-04-03 at 8.03.46 AM.png

    Also, I don't want to aggregate the result.

  • User_F2RD3
    User_F2RD3 Rank 4 - Community Specialist

    SUM didn't work. However, MAX and MIN, did. I assume that since the formula produces one result, MIN and MAX produce the same result and change it to a Fact.

  • Syamantak Saha
    Syamantak Saha Rank 5 - Community Champion

    Mathematically what you are saying makes sense - but check for the compatiblity of the two functions TIMESTAMPDIFF and SQL_TSI_DAY. I think the first one expects a full timestamp, whereas the second only seems to provide the DAY without the rest of the hours, minutes, seconds?