Categories
- All Categories
- Oracle Analytics Learning Hub
- 30 Oracle Analytics Sharing Center
- 19 Oracle Analytics Lounge
- 241 Oracle Analytics News
- 45 Oracle Analytics Videos
- 16K Oracle Analytics Forums
- 6.3K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 89 Oracle Analytics Trainings
- 16 Oracle Analytics and AI Challenge
- Find Partners
- For Partners
Is there a way to get the difference between 2 rows as a Grand Total
I know that the msum function can get that, but I need to display it as a column total not another column.
For instance using the Financials -GL Balance Sheet Subject Area and using Fiscal year
Fiscal Year #Cash
2024 50,000
2025 48,000
Grand Total 2,000
Best Answer
-
This worked for me. Row_count was a good clue. Thank you.
case COUNT(DISTINCT "Financials - GL Balance Sheet"."Time"."Fiscal Year")
when 1 then "Financials - GL Balance Sheet"."Balance Sheet Statement (LC)"."Cash"
when 2 thensum(
case "Financials - GL Balance Sheet"."Time"."Fiscal Year"
when year(CURRENT_DATE) then "Financials - GL Balance Sheet"."Balance Sheet Statement (LC)"."Cash"
when year(CURRENT_DATE)-1 then "Financials - GL Balance Sheet"."Balance Sheet Statement (LC)"."Cash"*-1
end
)
end0
Answers
-
Can you see if you can use following formula in a new measure :
CASE
WHEN GROUPING("Fiscal Calendar"."Fiscal Year") = 1 THEN
MAX("Balances"."Ending Balance")
- MIN("Balances"."Ending Balance")
ELSE
"Balances"."Ending Balance"
END0 -
case when Grouping("Financials - GL Balance Sheet"."Time"."Fiscal Year") = 1 then
max("Financials - GL Balance Sheet"."Balance Sheet Statement (LC)"."Cash")- min("Financials - GL Balance Sheet"."Balance Sheet Statement (LC)"."Cash")
else
"Financials - GL Balance Sheet"."Balance Sheet Statement (LC)"."Cash"
endI get this error
Function Grouping is not defined by administrator.
0 -
How about ROW_COUNT? Can you try this one …
case when row_count("Financials - GL Balance Sheet"."Time"."Fiscal Year") > 1
0 -
@SharonAtGorilla , I am very glad to see your issue is resolved. As per community guidelines, appreciate if we can mark the Answer as Accepted Answer. It will help the community for future references. Thanks
0
