Forum Discussion
pmadam
Helper II
6 years agoHelp division error
Hi All, I am trying to divide two text columns for a particluar dimension. So i get error when the numerator or denominator has blank value. I went forward and added if clause as below but i stil...
- 6 years ago
pmadam Maybe:
XY = IF( ISBLANK([DSAM Amount]) && Not(ISBLANK(VALUE([Customer Target]))), 0 , [Customer Target] / [DSAM Amount] )
pmadam
Helper II
6 years agoHi Greg_Deckler ,
I get error. These measures are in text because when i added comma seperator, the measures were converted to type int to text.
dedelman_clng
Community Champion
6 years agopmadam you have the wrong syntax for DIVIDE:
Greg_Deckler 's code: XY =DIVIDE( [Customer Target], [DSAM Amount], 0 )
Your code: XY =DIVIDE( [Customer Target] / [DSAM Amount] ,0 ).
Even if you didn't throw an error with one of your "numbers" being empty, you are dividing by 0.
Hope this helps
David