The OneStream Community is temporarily frozen until June 29th due to the ongoing maintenance. Please read the blog post here to learn more.
Forum Discussion
FM
3 years agoNew Contributor III
Cube View Parametric driven column
I have a cube view that I need to modify so that in the second column we are getting data that is driven by the selection that the user makes for the first column.
For example if the user selects a...
- 3 years ago
Our consultant showed me to use Text attribute for scenario to get prior forecast. So in Jan_FCST, if you assign Text1 attribute as Feb_FCST, then in your OP filter, you can retrieve S#Fcsts.base.Where(Text1 = |!param_FCST!|). This setup allow when users select Feb_FCST for Forecast column, OP column will retrieve S#Fcsts.base.Where(Text1 = Feb_FCST) which would be Jan_FCST).
This works for cube view, but our users want to use this setup for quick view. However I don't know of a way to make parameter prompt in quick view. If anyone has any tips to apply this for quick view, please advise. Thank you!
- 3 years ago
I agree with aricgresko on perhaps using an XFBR business rule. The below code could be optimized in many ways, but should work for what you need. This way you do not need to use/manage any text values.
"YourRuleNameHere" will equal what you named your XFBR business rule, ensure whatever you named it matches the XFBR call you place in the cube view.
XFBR Cube View Line Call (What you would put on your cube view line instead of "S#|!param_FCST!|"):
XFBR(YourRuleNameHere, GetPriorFcst, CurrentFcst=|!param_FCST!|)Create an XFBR Business Rule and paste in the following code:
Imports System Imports System.Data Imports System.Data.Common Imports System.IO Imports System.Collections.Generic Imports System.Globalization Imports System.Linq Imports Microsoft.VisualBasic Imports System.Windows.Forms Imports OneStream.Shared.Common Imports OneStream.Shared.Wcf Imports OneStream.Shared.Engine Imports OneStream.Shared.Database Imports OneStream.Stage.Engine Imports OneStream.Stage.Database Imports OneStream.Finance.Engine Imports OneStream.Finance.Database Namespace OneStream.BusinessRule.DashboardStringFunction.YourRuleNameHere '<--------- NEED TO CHANGE "YourRuleNameHere" AND ADD TO XFBR CALL WITHIN CUBE VIEW Public Class MainClass Public Function Main(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As DashboardStringFunctionArgs) As Object Try If args.FunctionName.XFEqualsIgnoreCase("GetPriorFcst") Then Dim CurrFcst As String = args.NameValuePairs("CurrentFcst") Dim PriorFcst As String = String.Empty Select Case CurrFcst Case "Jan_FCST" PriorFcst = "Dec_FCST" Case "Feb_FCST" PriorFcst = "Jan_FCST" Case "Mar_FCST" PriorFcst = "Feb_FCST" Case "Apr_FCST" PriorFcst = "Mar_FCST" Case "May_FCST" PriorFcst = "Apr_FCST" Case "Jun_FCST" PriorFcst = "May_FCST" Case "Jul_FCST" PriorFcst = "Jun_FCST" Case "Aug_FCST" PriorFcst = "Jul_FCST" Case "Sep_FCST" PriorFcst = "Aug_FCST" Case "Oct_FCST" PriorFcst = "Sep_FCST" Case "Nov_FCST" PriorFcst = "Oct_FCST" Case "Dec_FCST" PriorFcst = "Nov_FCST" End Select Return "S#" & PriorFcst End If Return Nothing Catch ex As Exception Throw ErrorHandler.LogWrite(si, New XFException(si, ex)) End Try End Function End Class End Namespace
aricgresko
3 years agoContributor III
For cube views, you could write an XFBR to derive the prior forecast based on the forecast that was selected via parameter. For quick views, I would recommend setting up some literal parameters. This would be something the admin would maintain, but it's very easy and only a once a month update.
Example of how you could setup these literal parameters:
|!CurrFcstScenario!| = Feb_FCST
|!PriorFcstScenario!| = Jan_FCST
Then you teach the users how to use the above two literal value parameters in their quick views and XFGetCell's to automate the correct forecast scenarios.
LeAnnTDang
3 years agoNew Contributor III
Our users would like to manage the selection in Prior Fcst Scenario by themselves, because they could be selecting prior month, prior quarter, etc... They have multiple quick views on a spreadsheet and would like one scenario selection to apply to all quick views, rather than going to each quick view and update scenario. Do you have suggestions on how to make that work?
- aricgresko3 years agoContributor III
I'm pretty sure there isn't a way to update multiple quick views simultaneously. You'd only be able to accomplish this with XFGetCell.
- LeAnnTDang3 years agoNew Contributor III
Thank you Aric. I ended up setting up an XFBR like as suggested in this chain and use a literal parameter to set up the XFBR
S#XFBR(BusinessRuleName, FunctionName, NameValuePair=|POVScenario|), so the main POVscenario would be the driver for prior forecast.
That seems to work for now. Thanks again for your help.
Related Content
- 3 months ago