FDX Data Unit - Exclude Zero Data Records

Clifton
New Contributor II

Hello OS Community, 

 I noticed there was a variable for suppressing no data records when using the FdxExecuteDataUnit function.  Is there a way to bypass zero data records?  

Thanks in advance for your help!

Clifton

2 ACCEPTED SOLUTIONS

Sai_Maganti
Contributor II

You can use the Filter parameter and filter "Amount <> 0"

View solution in original post

ChristianW
Valued Contributor

Thank you Sai_Maganti

I was a little too late, but I tested it, it works perfectly. Cheers

Dim yourCube As String = "legal"
Dim yourEntity As String = "Group"
Dim test As DataTable = BRApi.Import.Data.FdxExecuteDataUnit(si, yourCube, $"E#{yourEntity}.DescendantsInclusive", "Local", ScenarioTypeId.Actual, "S#Actual", "T#2022M3", "YTD", True, "Amount <> 0", 4, False)
If test IsNot Nothing Then brapi.ErrorLog.LogMessage(si, $"Count {test.Rows.Count}", String.Join(vbnewline, test.select("").Select(Function(x) String.Join(",",x.ItemArray)))) Else brapi.ErrorLog.LogMessage(si, "Nothing")
						

 

View solution in original post

3 REPLIES 3

Sai_Maganti
Contributor II

You can use the Filter parameter and filter "Amount <> 0"

ChristianW
Valued Contributor

Thank you Sai_Maganti

I was a little too late, but I tested it, it works perfectly. Cheers

Dim yourCube As String = "legal"
Dim yourEntity As String = "Group"
Dim test As DataTable = BRApi.Import.Data.FdxExecuteDataUnit(si, yourCube, $"E#{yourEntity}.DescendantsInclusive", "Local", ScenarioTypeId.Actual, "S#Actual", "T#2022M3", "YTD", True, "Amount <> 0", 4, False)
If test IsNot Nothing Then brapi.ErrorLog.LogMessage(si, $"Count {test.Rows.Count}", String.Join(vbnewline, test.select("").Select(Function(x) String.Join(",",x.ItemArray)))) Else brapi.ErrorLog.LogMessage(si, "Nothing")
						

 

Clifton
New Contributor II

That is pretty simple. Appreciate the help!