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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Richard76
Helper II
Helper II

Formating a table

Hi Folks,

new to power BI and just designing my first reports. I have read a lot of atricles online but cant seem to find a solution for what would seem a very basic formatting request. I am getting my data from SQL server in tabular form and have created a simple sales table. I have formatted the data to £ which is fine but the numbers are coming through as say £3,000,000 when I want it to say £3000k in order to reduce the clutter in the table. 

Surely a simple solution ??

 

Thanks

Richard

1 ACCEPTED SOLUTION
Sachy123
Helper V
Helper V

Create a new Column in the datamodel and use if statment while formatting

something like this

 

[url=https://imgbb.com/][img]https://image.ibb.co/kPnzsn/Formatting.png[/img][/url]

View solution in original post

4 REPLIES 4
v-xjiin-msft
Solution Sage
Solution Sage

Hi @Richard76,

 

Currently, all the built-in formats are listed in the Format option in Modeling pane. If there doesn't exist the format like £3000k, it means that we cannot achieve it with built-in ways.

 

So to achieve your requirement, we need some workarounds. We should first define an unit and manually format the original currency to your wanted format. Please refer to following calculated column:

 

Formatted amount =
IF (
    Amount[Amount] > 3000,
    "£" & DIVIDE ( Amount[Amount], 1000 )
        & "K",
    "£" & FORMAT ( Amount[Amount], "####" )
)

11.PNG

 

However, by doing this the new column will be displayed as text type no longer numbers. Because there's no such format in numbers column. If you still want to keep numbers column with your wanted format. I'm afraid currently it is not supported in Power BI desktop. And I would suggest you to submit an idea here for a feature request.

 

Thanks,
Xi Jin.

Sachy123
Helper V
Helper V

You will need use if clause in the DAX query in your model something like below

Formatting.png

Really ?? So if I have 12 columns I need to format I need to add in 12 new columns together with the formule below. 

I thought it would be a click of a button job ! 

Sachy123
Helper V
Helper V

Create a new Column in the datamodel and use if statment while formatting

something like this

 

[url=https://imgbb.com/][img]https://image.ibb.co/kPnzsn/Formatting.png[/img][/url]

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.