Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Infinity values in calculated column without any division with zero - How to correct?

Hi! I am trying to create a calculated column by dividing 2 values as below:   Market value of stock/portfolio value (a calculated field)   I am getting infinity values for above even thoug...
  • v-cazheng-msft's avatar
    v-cazheng-msft
    4 years ago

    Hi Anonymous ,

     

    That’s weird. Even with the sample data from you, I can’t repro this issue as well.

    Portfolio value Table

     

    Stocks Table

     

    No relationship between these two tables

     

    Calculations:

    1 Portfolio value (Measure)

     

    Portfolio value = CALCULATE(SUM('Portfolio value'[Value]),FILTER('Portfolio value', 'Portfolio value'[Holding type] <> "Liabilities"))

     

     

    2 Stock Yield (Calculated column)

     

    Stock Yield = DIVIDE(Stocks[Market Value],[Portfolio value])*Stocks[Gross indicative div yield]

     

     

    Drag Stock Yield to clustered column chart, it looks like this.

     

    Could you please drag and drop "Portfolio value" Measure to a table visual to check whether it has correctly calculated the result? In addition, please check if this issue is caused by improper data type or filters in the report. Thanks in advance!

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!

     

    Best Regards,

    Community Support Team _ Caiyun