Forum Discussion

elzahy's avatar
elzahy
New Member
3 years ago
Solved

How to create fraction based on 2 calculated columns

Hello,   I would like to display fraction in name card based on 2 calculated columns. fraction= var given= 'table'[R] var precision='table'[T] return (given*precision/GCD(given*precision,preci...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi  elzahy ,

    You can try the following dax:

    Column =
    var given= 'table'[R]
    var precision='table'[T]
    var value1=given*precision/GCD(given*precision,precision)
    var value2=precision/GCD(given*precision,precision)
    return
    FORMAT(value1,"$#,##0") &"/"& value2

     

    Best Regards,

    Liu Yang

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