Categories
- All Categories
- 15 Oracle Analytics Sharing Center
- 16 Oracle Analytics Lounge
- 216 Oracle Analytics News
- 43 Oracle Analytics Videos
- 15.7K Oracle Analytics Forums
- 6.1K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 79 Oracle Analytics Trainings
- 15 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
How can you change a dimension into a fact?

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
-
You can add SUM() before your calculation:
SUM(TIMESTAMPDIFF(SQL_TSI_DAY, {date 1},{date2}))
2 -
SUM didn't work, but MIN and MAX do. I assume because the result of the formula is just one result.
2
Answers
-
Hi @User_F2RD3,
you have to add an aggregate function to change the column from attribute to metric
0 -
When I add it to a column, I don't get the Aggregate function.
Also, I don't want to aggregate the result.
0 -
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.
1 -
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?
0