Forum Discussion
Calculated field with matrix
- 7 years ago
Thank you for your help
I understood how to do this, first I need to group my class confidence and then use your divide function.
Accuracy = CALCULATE(divide(sum('table'[NoClassChange]), sum('table'[ClassChange])+sum('table'[NoClassChange])), fILTER(ALL('table'), 'table'[MEDTR_FRONT_VDAC_CLASS_CONF] = EARLIER('table'[MEDTR_FRONT_VDAC_CLASS_CONF])))
My table with measure just make sure it is formatted for percentage
d
If this solves your issue, please mark this as the solution. Kudos are nice too!
Nathaniel
- c59667 years agoHelper I
thanks for the quick resonse.
I have a questin, is it a caculated measure or calculated column which you have created below?
Thanks
- Nathaniel_C7 years agoCommunity Champion
You are right, calculated column is what it is as opposed to a measure. Working on another project, and was to quick with my answer.
So did this answer your issue?
- Nathaniel_C7 years agoCommunity Champion
Not sure what you are asking...should be the same with 1 or 0. Just reference the column name. Divide will return a blank unless you give it an alternative return for a divide by zero. See Dax Divide on the web:
Syntax
DAXCopyDIVIDE(<numerator>, <denominator> [,<alternateresult>])Parameters
Term Definitionnumerator The dividend or number to divide. denominator The divisor or number to divide by. alternateresult (Optional) The value returned when division by zero results in an error. When not provided, the default value is BLANK(). Return value
A decimal number.
Remarks
Alternate result on divide by 0 must be a constant.
If this answers you issue please mark as the solution.
Nathaniel
- c59667 years agoHelper I
Also my NoClassChange column is calculated column:
it has one and 0 values
NoClassChange = if(export_lbj_8753[Change_Class] = "NoClassChange", 1,0)ClassChange = if(export_lbj_8753[Change_Class] = "ClassChange",1,0)how do we create divide formula on aggregated data? for this calculation.