Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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
Solved! Go to Solution.
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.
Measure =
FORMAT(
DIVIDE(
SELECTEDVALUE('Table'[A] ),
SELECTEDVALUE('Table'[B] )
),
"#,0"
)
& ":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
Hi @mithiladas02.
Something like this should work:
Measure =
DIVIDE(
SELECTEDVALUE('Table'[Numerator] ),
SELECTEDVALUE('Table'[Denominator] )
)
& ":1"
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.
Measure =
FORMAT(
DIVIDE(
SELECTEDVALUE('Table'[A] ),
SELECTEDVALUE('Table'[B] )
),
"#,0"
)
& ":1"
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
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 30 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |