Forum Discussion

mithiladas02's avatar
mithiladas02
Helper I
4 years ago
Solved

How to Show Ratio?

hi,

i want to write dax for ratio.

for example-Column A=27 and and column B=18, 27/18 , so i want to show the value 3:2

 

Thanks in Advance.

  • Hi mithiladas02 ,

     

    Create a column with below code:-

    Column =
    VAR _value =
        GCD ( [A], [B] )
    RETURN
        DIVIDE ( [A], _value ) & ":"
            & DIVIDE ( [B], _value )

     

    output:-

     

    Thanks,

    Samarth

     

2 Replies