Forum Discussion
WillVitale
2 years agoContributor II
Cell Value Showing "OK"
Hello,
I was wondering if it's possible to have a check figure if the amount equals 0 that it displays "OK" and if it doesn't it says "Check Details". I've tried conditional formatting when the cel...
- 2 years ago
Yes, but in the U8 you would have to recalculate that Total value, because dynamic calcs don't know anything about columns.
WillVitale
2 years agoContributor II
Hello,
No, annotation is not what I want. I have my column currently doing a calculation to determine if the cell is 0 or not. I was just wondering like in excel if you do like If(cell x=0,"OK","Check Details"). Something like that.
JackLacava
OneStream Employee
2 years agoThe point parent was trying to make is that the column might have to be configured as supporting text, which would happen if you point it to V#Annotation (regardless of what the formula does).
To be honest, the best way to approach these problems is typically to build a little U8 DynamicCalc formula that will do the calculations and return "OK"/"Check" (ideally for a text-supporting view like Annotation).
Rough outline of such a U8 off the top of my head:
if api.View.isAnnotationType then
' example check
if api.Data.GetDataCell("A#Something - A#SomethingElse") = 0 then
return "OK"
else
return "Check Details"
end if
end ifYou'd then point the column at U8#MyNewMember:V#Annotation to display the generated values.
Depending on the use case, it might also be enough to simply highlight "check details" rows with Conditional Formatting and be done with it:
If CellAmount > 0 then
BackgroundColor = Red
TextColor = White
End if
- WillVitale2 years agoContributor II
Hi Jack,
I understand what you're saying, but the formula I have is a GetDataCell calc subtracting from a some accounts. Does that still work?
Will
- JackLacava2 years ago
OneStream Employee
Yes, but in the U8 you would have to recalculate that Total value, because dynamic calcs don't know anything about columns.
- bhenneuse1 year agoNew Contributor II
Jack - Came across this thread - when I try this I get:
- manthangandhi1 year agoNew Contributor III
bhenneusethe only problem I see is you need to add the CellAmount property in your GetDataCell function. So the condition would look something like below:
If api.Data.GetDataCell("RemoveZeros(U8#Non:T#" & currentPeriod &" - U8#None:#" & priorPeriod & ")").CellAmount = 0 Then Return "True" Else Return "False" End IfHope this works!
- bhenneuse1 year agoNew Contributor II
Thanks! That was another piece to the puzzle. It still wasn't working until I realized that I needed to call out the View of the get data cell formula as different than the annotation type of the column.
Dim selectedAcct As String = api.Pov.Account.Name Dim currentPeriod As String = api.Pov.Time.Name Dim priorPeriodID As String = api.Time.GetPriorPeriod() Dim priorPeriod As String = api.Time.GetNameFromId(priorPeriodID) If api.View.IsAnnotationType Then If api.Data.GetDataCell("V#YTD:U8#None:T#" & currentPeriod &":A#" & selectedAcct &" - V#YTD:U8#None:T#" & priorPeriod &":A#" & selectedAcct &")").CellAmountAsText = "0" Then Return "False" Else Return "True" End If End If
- Krishna1 year agoValued Contributor
The Data Cell is an object you cannot return the object without its proper functions. See below an example
'Data Cell
Dim eqtyDataCell As DataCell
eqtyDataCell = api.Data.GetDataCell("cb#Cube:E#" & Parent1 & eqtyPov).CellAmount
Related Content
- 1 year ago
- 2 years ago
- 3 years ago