Forum Discussion
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 useMeasure =var d = DIVIDE([Number of Consistent],[Num Overscore],0)var ret = if(d = 0,blank(),d)Return ret
6 Replies
- AnthonyTilleySolution Sage
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 valuefor example 0/100 = 0% but you want to show these as Blank insteadMeasure =var d = DIVIDE([Number of Consistent],[Num Overscore],0)var ret = if(d = 0,blank(),d)Return retthis will replace any result of 0 with a blank - AnthonyTilleySolution Sage
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 thisMeasure =var d = DIVIDE([Number of Consistent],[Num Overscore],0)var ret = if(d = 0,blank(),d)Return retthis will replace any 0 values with blank - AnthonyTilleySolution Sage
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 useMeasure =var d = DIVIDE([Number of Consistent],[Num Overscore],0)var ret = if(d = 0,blank(),d)Return ret - AnthonyTilleySolution Sage
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 useMeasure =var d = DIVIDE([Number of Consistent],[Num Overscore],0)var ret = if(d = 0,blank(),d)Return ret - AnthonyTilleySolution Sage
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 useMeasure =var d = DIVIDE([Number of Consistent],[Num Overscore],0)var ret = if(d = 0,blank(),d)Return ret - AnonymousNot applicable
Hi Anonymous ,
Instead of a/b, use DIVIDE() in dax. Here , you can pass alternate value.
https://docs.microsoft.com/en-us/dax/divide-function-dax
In order to deal with blank values, use blank() with IF().
Do some workaround, It will easily solve your existing DAX calculation.Thanks,
Amit