Forum Discussion

jahnabi123's avatar
jahnabi123
New Member
5 years ago

Dax calculation for DIVIDE

I am facing a very strange issue. I have 2 measures both data type decimal.
I am dividing one by the other. Now, even if both the measures have the same value, the result is not 1.
This is the dax: 

Household factor = DIVIDE( [Total Households],[Total Household cust],0)

3 Replies

    • jahnabi123's avatar
      jahnabi123
      New Member

      Total Household = SUM(account_history[a_se_hh_tot])

      Total Household cust = CALCULATE(SUM(account_history[a_se_hh_tot]), ALL(account_history[CEM], account_history[Fee Model], account_history[funding_type_code],account_history[cohort_golive2],account_history[date_golive], account_history[customer_name], account_history[employer_name] ))

  • v-xicai's avatar
    v-xicai
    Community Support

    Hi jahnabi123 ,

     

    There may be a tiny gap between the two measures, so you may try to limit the decimal places for the measures.

     

    Household factor =
    DIVIDE (
        ROUND ( [Total Households], 2 ),
        ROUND ( [Total Household cust], 2 ),
        0
    )
    

     

    Best Regards,

    Amy 

     

    Community Support Team _ Amy

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.