Forum Discussion

Sheref_Morad's avatar
Sheref_Morad
Frequent Visitor
4 years ago
Solved

Divide Function

I am trying to create a calculated column in the customer table for predicted customer incomes using the divide Function and gives me a Blank column, although the formula is correct
  • tamerj1's avatar
    tamerj1
    4 years ago

    Sheref_Morad 
    Here is your fil with the solution https://www.dropbox.com/t/CChylr4UPd28RtxH
    Measures are automatically wrapped with CALCULATE which forces context transition. On the other hand using the formulas directly will be extremely complicated. Therefore, use can do the following:

    Predicted Income = 
        Divide (  
            RELATED ( 'Regression Table'[y] ) - CALCULATE ( [b], ALL ( 'Regression Table' ) ), 
            CALCULATE ( [m], ALL ( 'Regression Table' ) )
        )

    This shall solve your problem.