Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
I have a Bar Chart that shows the total size (in bytes) for each status of a project. Is there a formula I can create to display the values in KB, MB, GB, TB, etc. For example, if the size is 10485760, I want to display 10.00 MB. Below is a reference to where I hope to supply the custom formatting.
Thanks in advance!
Hi @Jeff2Jets ,
I wanted to follow up and see if you’ve had a chance to review the information provided here.
If any of the responses helped solve your issue, please consider marking it "Accept as Solution" and giving it a 'Kudos' to help others easily find it.
Let me know if you have any further questions!
Hi @Jeff2Jets , Thank you for reaching out to the Microsoft Community Forum.
Please try below and tell me if it works, If it doesn't, please share the sample file with data.
Formatted Size =
VAR SizeInBytes = SELECTEDVALUE('Table'[Size in Bytes], SUM('Table'[Size in Bytes]))
VAR UnitIndex =
MIN(
4,
FLOOR(
IF(SizeInBytes > 0, LOG(ABS(SizeInBytes), 1024), 0),
1
)
)
VAR ConvertedSize =
DIVIDE(SizeInBytes, POWER(1024, UnitIndex), 0)
VAR Unit =
SWITCH(
UnitIndex,
0, "Bytes",
1, "KB",
2, "MB",
3, "GB",
4, "TB"
)
RETURN
IF(
ISBLANK(SizeInBytes),
BLANK(),
FORMAT(ConvertedSize, "0.00") & " " & Unit
)
If this helped solve the issue, please consider marking it 'Accept as Solution' so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you.
Thanks for the input, but none of the methods you suggested can do what I need. I want to be able to display values in a matrix that are auto-formatted using KB, MB, GB, or TB. For example, if there is a size column in a matrix that has the number of Bytes, I want to have a formula that can dynamically convert the number of Bytes to the proper power of 1024 (K). If one row has a size of 10,726,932 Byyes, I want the column to display 10.23 MB. If the next row has a size of 1,452,856,985 Bytes, I want the column to display 1.35 GB. Is there a way to do this and if so, please include an example of how.
Hi @Jeff2Jets , Please let us know if your issue is solved. If it is, consider marking the answer that helped 'Accept as Solution', so others with similar queries can find it easily. If not, please share the details.
Thank you.
Hi @Jeff2Jets , Please let us know if your issue is solved. If it is, consider marking the answer that helped 'Accept as Solution', so others with similar queries can find it easily. If not, please share the details.
Thank you.
Hi @Jeff2Jets , Thank you for reaching out to the Microsoft Community Forum.
Please let us know if your issue is solved. If it is, consider marking the answers that helped 'Accept as Solution', so others with similar queries can find them easily. If not, please share the details.
Thank you.
User | Count |
---|---|
65 | |
60 | |
47 | |
33 | |
32 |
User | Count |
---|---|
85 | |
75 | |
56 | |
50 | |
45 |