Forum Discussion

rishtin's avatar
rishtin
Frequent Visitor
6 years ago
Solved

Three variable Ratio in DAX

Hello,   I have been using divide function in DAX to determine ratio between two numbers. So in this case the result is a single decimal number as an ouput. For Example, Ratio between 12, 6 is 2 an...
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi rishtin 

     

    I would figure out which value is the smallest in your three columns, then divide it all by that value. I am assuming you're okay with decimal values and that the small value you want to see is 1. This will format it in the following format "2:1:3".

     

    Ratio =
    VAR SM = min(MIN('Table'[Column1],'Table'[Column2]),'Table'[Column3])
    RETURN
    DIVIDE('Table'[Column1],SM)&":"&DIVIDE('Table'[Column2],SM)&":"&DIVIDE('Table'[Column3],SM)
     
    -Paul