Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago
Solved

Displaying % as Ratio

Hi All, 

 

I am trying to make a % visible in a different format. 

E.g. Instead of 1.81% I want to show 1:50.

 

In Excel I use the following formula: "="1" & ":" & ROUND(($B$1/C1),0)"

In Power BI I am able to calculate the % via a measure but how can I make sure it displays in the 1:50 format?

 

With kind regards,

Mike

  • GilbertQ's avatar
    GilbertQ
    9 years ago

    Hi Anonymous

     

    No worries, please see below the proposed solution.


    Here is the measure that I created

    Column E Result = "1:" & ROUND(CALCULATE(SUM('Table1'[A])/SUM('Table1'[B])),0)

    And this is what the result looks like

     

9 Replies

  • Hi Anonymous

     

    Could you provide a sample of data, one where it would calculate the % and one where it would be the 1:xx (Or even if the values are the same, what the sample data is)?

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi there!

       

      Thanks for your response please see below:

      In the Excel formula its ROUND(B/A,0)

       

      A       B      C      D     E
      80000   2000   0.025  40    1:40
      3000    20     0.006  150   1:150
      400     5      0.0125 80    1:80

       

      I get to calculate column C as well as the correct result for behind the : now how do I format it so that it looks like 1:##?

      Ratio = FORMAT(ROUND(divide(sum(B),sum(A),0),"1:")

       

      Bests,

      Mike

      • GilbertQ's avatar
        GilbertQ
        Super User

        Hi Anonymous

         

        No worries, please see below the proposed solution.


        Here is the measure that I created

        Column E Result = "1:" & ROUND(CALCULATE(SUM('Table1'[A])/SUM('Table1'[B])),0)

        And this is what the result looks like