Categories
- All Categories
- Oracle Analytics Learning Hub
- 28 Oracle Analytics Sharing Center
- 18 Oracle Analytics Lounge
- 236 Oracle Analytics News
- 45 Oracle Analytics Videos
- 16K Oracle Analytics Forums
- 6.2K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 87 Oracle Analytics Trainings
- 15 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
Formula to to always aggregate by a dimension and allow other grouping in visual
We have a formula that should always be aggregated by the Ledger Currency in FDI but it also may need to be visualized by other dimensions: Fiscal Year, or Business Unit, Supplier, etc.
Currently, we set the values tab on the properties tab for the visual
- Aggregation Method: Sum
- By: Ledger Currency, Fiscal Year, etc.
Attempt using formula:
Using aggregate by function, we can get enforce the granularity of the calculation, but this overrides the default aggregation of the visual.
sum( aggregate( Payments Amount * Ledger Exchange Rate by Ledger Exchange Rate )
The formula above will show the right total for a card visual, but if put on a bar chart with fiscal year on the axis, it shows the same amount for every fiscal year.
Is there any way to write a formula that will work well in a variety of contexts, or is this something that must be set every time the calculation is used on a visual?
Thanks,
Answers
-
If you are using the BI Administration Tool for your data modeling, you can create multiple logical table sources within one logical fact table. Whichever logical table source fits the granularity of the analysis will be used for running the analysis. For example, if one table source includes a mapping to both Ledger Currency and Fiscal Year, while another includes a mapping to Ledger Currency (but not to Fiscal Year), the table source that contains Fiscal Year will be used only if Fiscal Year is included in the analysis; otherwise, the other table source will be used.
This means a fact column can have a different aggregation formula for each level of granularity.
NOTE: I do not know if this works for high-granularity visuals that are built off the results of lower granularity analyses. It may be that the granularity of the underlying analysis must match the visual's granularity.
Moreover, I've never tried this strategy in DV.
2
