Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
mithiladas02
Helper I
Helper I

How can i show ratio 100:1

Hi,

I am working with excel files. i have 2 fileds which i want show the value in matrix table like 100:1. For ex- column a / b but the value i will show 100:1.

 

will anyone one please help me to wrtite the dax formula?

 

Thanks in advance

2 ACCEPTED SOLUTIONS

Unless I misunderstand, my measure will do that. See the screenshot. And give it a try. For what it's worth, 55178 divided by 1091 is 50.57, not 5.

 

Edit: I added a format function to help with the decimals, and change the column headers to A and B to mtach your example. And attached a .pbix that you can download at this link.

 

SteveHailey_0-1644336097152.png

Measure = 
FORMAT( 
    DIVIDE( 
    SELECTEDVALUE('Table'[A] ), 
    SELECTEDVALUE('Table'[B] )
    ), 
"#,0"
)
& ":1"

 

View solution in original post

@mithiladas02 , Not sure about how we are calculating A= 55178 and B= 1091 as 5:1 actually it should be 50:1. You can refer below code:-

Measure =
VAR _Value = column_a / column_b
RETURN
    CONCATENATE (_Value , CONCATENATE ( " : ", "1") )

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

6 REPLIES 6
SteveHailey
Solution Specialist
Solution Specialist

Hi @mithiladas02.

Something like this should work:

Measure = 
DIVIDE( 
    SELECTEDVALUE('Table'[Numerator] ), 
    SELECTEDVALUE('Table'[Denominator] )
) 
& ":1"

SteveHailey_0-1644328229836.png

 



Thanks for your quick response.

 

but my problem is that-

suppose A=100 and B=10 and i want to show the value like- 10:01 same A= 55178 and B= 1091, the value will come 5:1

Unless I misunderstand, my measure will do that. See the screenshot. And give it a try. For what it's worth, 55178 divided by 1091 is 50.57, not 5.

 

Edit: I added a format function to help with the decimals, and change the column headers to A and B to mtach your example. And attached a .pbix that you can download at this link.

 

SteveHailey_0-1644336097152.png

Measure = 
FORMAT( 
    DIVIDE( 
    SELECTEDVALUE('Table'[A] ), 
    SELECTEDVALUE('Table'[B] )
    ), 
"#,0"
)
& ":1"

 

Samarth_18
Community Champion
Community Champion

Hi @mithiladas02 ,

 

You can create a custom column like below:-

 

Measure =
VAR _Value = column_a / column_b
RETURN
    CONCATENATE ( "100", CONCATENATE ( " : ", _Value ) )

 

 

Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Thanks for your quick response.

 

but my problem is that-

suppose A=100 and B=10 and i want to show the value like- 10:01 same A= 55178 and B= 1091, the value will come 5:1

@mithiladas02 , Not sure about how we are calculating A= 55178 and B= 1091 as 5:1 actually it should be 50:1. You can refer below code:-

Measure =
VAR _Value = column_a / column_b
RETURN
    CONCATENATE (_Value , CONCATENATE ( " : ", "1") )

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (1,420)