Also, if you vary this property by time or scenario:
Dim dValue As Decimal = BRApi.Finance.Entity.PercentConsolidation(si, entityId, parentId, varyByScenarioTypeId, varyByTimeId)
Dim percentage As Decimal = api.Entity.PercentConsolidation(entityId, parentId,varybyscenariptypeid,varybytimeid)
Dim entName As String = api.Members.GetMemberName(dimTypeId.Entity, entityId)
Dim parentName As String = api.Members.GetMemberName(dimTypeId.Entity, parentId)
api.LogMessage($"entName: {entName}; parentName: {parentName}; percentage = {percentage}")
Makes sure you set the last two options to true when pulling the %.
Then in your cube view if you have time across the columns and are varying this setting by time, it should show different % by time period.