Forum Discussion
Displaying % as Ratio
- 9 years ago
Hi Anonymous
No worries, please see below the proposed solution.
Here is the measure that I createdColumn E Result = "1:" & ROUND(CALCULATE(SUM('Table1'[A])/SUM('Table1'[B])),0)And this is what the result looks like
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)?
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
- GilbertQ9 years ago
Super User
Hi Anonymous
No worries, please see below the proposed solution.
Here is the measure that I createdColumn E Result = "1:" & ROUND(CALCULATE(SUM('Table1'[A])/SUM('Table1'[B])),0)And this is what the result looks like
- Anonymous9 years agoNot applicable
Awesome that workes! Thanks!
- GilbertQ9 years ago
Super User
Perfect, glad it solved your issue.
- Ashish_kumar126 years ago
Helper I
Hi GilbertQ , Can you please assist me in my scenario.
I have created a ratio and am trying to place it in MATRIX visual as have to display data in following manner -
Consultant
Total Leads submitted
Count of Approved Leads but no orders
Leads not approved
Count of Approved Leads and orders Placed
Total Leads : Approved Leads and orders Placed
A
47
2
35
10
=Round(47/10,0) &":1"
= 5 : 1
B
20
5
5
10
2 : 1
When I am trying to do the same in matrix visual it is not happening. When I place ratio without the columns with count then it is working - image below is as per data of Consultant A above
Also, another query is, since it is creating ratio in text format, I wish to sort the ratios with lowest ratio on top to highest ratio.
Example: instead of 2:1, 37:1 then 5:1 wish to display information as 37:1, 5:1 then 2:1
Please let me know.
Thanks.
Regards,
Ashish
- GilbertQ6 years ago
Super User
THis measure will work for you below.
ROUNDUP(DIVIDE(SUM('Table'[Total Leads]),SUM('Table'[Count aprroved])),0) & ":1"And here is the output
- Anonymous4 years agoNot applicable
very useful,thanks