More Filters in FdxExecuteDataUnit
Hello,
I'm building Dashboard Data Set business rule to retrieve data from cubes. Besides the member filters in FdxExecuteDataUnit parameters, I'd like to add some additional filters, like account dimension filters, UD1,/UD2/UD4 dimension filters. And filters could include plenty of values. How can I make it work? I try to defined it in below manner, but the result is not filtered as expected.
Dim additionalFilter As String = "Account = 'EBIT' OR ACCOUNT = 'CAPEX'"
'Execute FDX query
dt = BRApi.Import.Data.FdxExecuteDataUnit(
si,
"Total_Magna", ' Cube name
"E#Parent1,E#Parent2",
"C#USD",
ScenarioTypeId.Actual,
"S#Actual",
"T#2025M1",
"V#Periodic",
True,
additionalFilter,
100000,
False
)
Does your DataTable return any rows when you pass in an empty string as a filter e.g.
dt = BRApi.Import.Data.FdxExecuteDataUnit( si, "Total_Magna", ' Cube name "E#Parent1,E#Parent2", ConsMember.Local.Name, ScenarioTypeId.Actual, "S#Actual", "T#2025M1", ViewMember.Periodic.Name, True, String.Empty, 8, FalseIf so, check that the accounts you are trying to filter on actually exist in the Data returned. I would recommend building up your logic 1 filter at a time e.g. check EBIT exists, then add EBIT to filter, then check SALESTOT exists, then add SALESTOT to filter and check filter working correctly, etc
Also please observe you should not be passing in C# and V# into the BRApi (please see earlier comments on these dimensions and what the BRApi is expecting to be passed into it, this has been corrected in above snippet)
Edit: It should be noted that the filter on non-data unit dimensions is for base members only. Therefore I suspect EBIT and SALESTOT are parents, not base members of your Account dimension. Which might explain why your filter is not behaving as you would expect