Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

if error

hiii

i was trying to calculate sla% based on priority but i am getting an error while using IFERROR function

 

  • Hi Anonymous ,

     

    IFERROR Dax function needs 2 arguments to be passed while you have provided just 1 argument. 

     

    Syntax: IFERROR(Value1, Alternate Value if value1 results to error)

     

    If MitigationHit/MitigationCount results to error, what value should be returned it missing in you formula. Please include another arugument and this should work fine. 

     

    Reference Link: https://docs.microsoft.com/en-us/dax/iferror-function-dax#example 

     

    Give a thumbs up if this post helped you in any way and mark this post as solution if it solved your query !!!

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    HI Anonymous 

    Use 

    Alternatively use DIVIDE() function.

     

    Divide(Query1[Mitigated Hit],Query1[Mitigated Count],0)   //this will return 0 if divided by 0 and is preferred than IFERROR().

     

  • MattAllington's avatar
    MattAllington
    Community Champion

    You should read the error message. You should also investigate the DIVIDE function as an alternative 

  • Hi Anonymous ,

     

    IFERROR Dax function needs 2 arguments to be passed while you have provided just 1 argument. 

     

    Syntax: IFERROR(Value1, Alternate Value if value1 results to error)

     

    If MitigationHit/MitigationCount results to error, what value should be returned it missing in you formula. Please include another arugument and this should work fine. 

     

    Reference Link: https://docs.microsoft.com/en-us/dax/iferror-function-dax#example 

     

    Give a thumbs up if this post helped you in any way and mark this post as solution if it solved your query !!!