Forum Discussion
Divide 2 Calculated Columns
- 6 years ago
One thing I don't understand, you said you have 2 measures, so why are you not divinding those 2 using DIVIDE() function :
DIVIDE(measure1, measure2)
If you have 2 calculated columns, then it's different. (Calculated columns are visible in Data Vieaw and are calculating on each lines, measures are not visible in Data View but are listed in Field panel (with a specific icon, see below the black calculator is a measure, and the other one with a grey column, is calculated column). Measure can make a sum of a column for instance.
).
Otherwise I think your trouble might be linked to the context of your table, could you tell us more about the context in which you are are trying to divide the 2.
Anonymous try this
SignupOpsPercent =
DIVIDE(
CALCULATE(COUNT(CallLogging[CALL_ID]),CallLogging[CALL_TYPE]="signup"),
CALCULATE(COUNT(CallLogging[CALL_ID]),CallLogging[CALL_TYPE2]="Opps"),
0
)
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡
- Anonymous6 years agoNot applicable
Parry, I tried this and all I get is 0 for every row. The same thing happens with IFERROR - all zeros.
- AilleryO6 years agoMemorable Member
One thing I don't understand, you said you have 2 measures, so why are you not divinding those 2 using DIVIDE() function :
DIVIDE(measure1, measure2)
If you have 2 calculated columns, then it's different. (Calculated columns are visible in Data Vieaw and are calculating on each lines, measures are not visible in Data View but are listed in Field panel (with a specific icon, see below the black calculator is a measure, and the other one with a grey column, is calculated column). Measure can make a sum of a column for instance.
).
Otherwise I think your trouble might be linked to the context of your table, could you tell us more about the context in which you are are trying to divide the 2.
- Anonymous6 years agoNot applicable
The 2 fields are calculated just as above :
Opps = CALCULATE(COUNT(CallLogging[CALL_ID]),FILTER(CallLogging,CallLogging[CALL_TYPE2]="Opps"))Signups = CALCULATE(COUNT(CallLogging[CALL_ID]),FILTER(CallLogging,CallLogging[CALL_TYPE]="signup"))I tried this: DIVIDE([Signups],[Opps],0) and all it returns is 0 for every row. I also tried DIVIDE(SUM([Signups]),SUM([Opps]),0) and this says Parameter is not correct.