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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Sum data with custom suffix

Hey,

 

i'm trying to make my report a little bit more user-friendly by adding a custom suffix (in this case GB to show that my numbers are in Gigabytes). I added the suffix via the PowerQuery Editor:

= Table.TransformColumns(#"Geänderter Typ", {{"DriveSize", each Text.From(_, "de-DE") & " GB", type text}})

The problem is, that this changes the data format to "Text", which makes it impossible to calculate with. Does PowerBI have a feature similar to Excel, where i can add user defined formats for numbers or is there any other way?

 

Thanks!

5 REPLIES 5
sturlaws
Resident Rockstar
Resident Rockstar

Hi, @Anonymous,

 

there is no equivalent function in Power BI. You could try to use the concatenate function in a measure, and see if that helps:  concatenate(sum(value)," GB")

Anonymous
Not applicable

Hey @sturlaws ,

 

that really helped for the first step. Thanks! Now i wanted to add a thousands seperator. That does not seem to work, since the measure is considered a text, too.

 

Greetings!

Hi @Anonymous ,

It is not supported to calculate values with suffixes. You need to calculte firstly, then add the suffixes.

You could try the following formula to implement the requirement. But it is still showed as text .

Column = FORMAT('Table'[VALUES],"#,##GB")

1.PNG

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hey @v-xuding-msft ,

 

the format looks great with your solution but the problem is, that i'm using a table to display the drive sizes of different virtual machines. In the raw data, there could be several records for one VM. i.e.

VM-DC-01   100      E:
VM-EX         900     D:
VM-FS       2000     F:
VM-DC-01     50     C:

So for the VM "VM-DC-01", my table should display the total (summed up) drive size of "150 GB". With your solution, i can't change to sum in the visual options for that field:

Power BI Desktop.png

But by combining yours and @sturlaws solution, i came as close as i can get! 🙂 So thanks to the both of you!... (I would have to mark both of your comments as accepted solution... what's the best way to do that?)

 

I ended up with this measure, which works fine so far:

GB_Test = FORMAT(SUM('Table'[DriveSize]);"#,## GB")

Thanks to the both of you!

 

Edit (29.07.2019 08:55):

Now i found the downer for this solution. I can't sort by size in my table. The data gets sorted as text, which is not want i want (the screenshot shows a table where virtual machines are grouped by customer. Similar to the sample above) 😞

01_Power BI Desktop.png

 

Anonymous
Not applicable

I had a similar situation with number values that represent Watts, a first request was display on Kilo Watts (KW), the second was add the KW suffix but as you if I do that, the number change to text, so I end let with the suffic and indicate only on the Column Title.

 

My recommendation, it's better have the functionality vs look & feel, but try to let the Suffix on titles with bigger size letter.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors