Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

IF(ISBLANK(

Hi,

 

At first i had a simple divide to work out the % of cosistency ([Number of Consistent]/[Num Overscore]) however it wasnt accurate for ones that have 0% so i used an if formula if([Number of Consistent]/[Num Overscore]),([Number of Consistent]/[Num Overscore]),0). This would put 0% if for the values even if they had blank in them so ive tried adding an ifblank formula in but im having some trouble.

 

% Consistent = if(ISBLANK([Number of Consistent]/[Num Overscore],BLANK(),IF([Number of Consistent]/[Num Overscore],[Number of Consistent]/[Num Overscore],0)))

 

Any help is appreciated.

 

  • If your problem is a divide by zero issue the use divide function instead of "/"

    instead of [Number of Consistent]/[Num Overscore] use 

    measure = DIVIDE([Number of Consistent],[Num Overscore],0) this will handle divide by zero issues

    if you want to replace a value of 0% with a new value then use 

    Measure =

    var d = DIVIDE([Number of Consistent],[Num Overscore],0)

    var ret = if(d = 0,
    blank(),
    d)
    Return ret

6 Replies

  • a little unclear as to what your issue is with this one.

     

    are you having a divide by Zero error - if so instead of using [Number of Consistent]/[Num Overscore]

    use a divide as this will handle the divide by zero issue and allow you to simply defult to 0%

    DIVIDE([Number of Consistent],[Num Overscore],0)
     
    or are you wanting anything that results in a 0% to show a diffrent value 
    for example 0/100 = 0% but you want to show these as Blank instead

    Measure =

    var d = DIVIDE([Number of Consistent],[Num Overscore],0)

    var ret = if(d = 0,
    blank(),
    d)
    Return ret
     
    this will replace any result of 0 with a blank
  • a little unsure on your issue is it a divide by zero issue or a replace value 0 with diffrent value

    if your having a divide by zero isue for example 100/0 = error then use divide function instead of [Number of Consistent]/[Num Overscore]

    DIVIDE([Number of Consistent],[Num Overscore],0)
     
    this will solve the devide by zero issue and replace any errors with 0

    if your wanting to take any value that is returned 0% for example 0/100 = 0% and you want to replace with blank then use something like this

    Measure =

    var d = DIVIDE([Number of Consistent],[Num Overscore],0)

    var ret = if(d = 0,
    blank(),
    d)
    Return ret
     
    this will replace any 0 values with blank 
  • If your problem is a divide by zero issue the use divide function instead of "/"

    instead of [Number of Consistent]/[Num Overscore] use 

    measure = DIVIDE([Number of Consistent],[Num Overscore],0) this will handle divide by zero issues

    if you want to replace a value of 0% with a new value then use 

    Measure =

    var d = DIVIDE([Number of Consistent],[Num Overscore],0)

    var ret = if(d = 0,
    blank(),
    d)
    Return ret
  • If your problem is a divide by zero issue the use divide function instead of "/"

    instead of [Number of Consistent]/[Num Overscore] use 

    measure = DIVIDE([Number of Consistent],[Num Overscore],0) this will handle divide by zero issues

    if you want to replace a value of 0% with a new value then use 

    Measure =

    var d = DIVIDE([Number of Consistent],[Num Overscore],0)

    var ret = if(d = 0,
    blank(),
    d)
    Return ret
  • If your problem is a divide by zero issue the use divide function instead of "/"

    instead of [Number of Consistent]/[Num Overscore] use 

    measure = DIVIDE([Number of Consistent],[Num Overscore],0) this will handle divide by zero issues

    if you want to replace a value of 0% with a new value then use 

    Measure =

    var d = DIVIDE([Number of Consistent],[Num Overscore],0)

    var ret = if(d = 0,
    blank(),
    d)
    Return ret