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
Barculez
Regular Visitor

Format of number

Hi,

 

i would like to ask you for help with format of number in the table.

 

My problem is, that i want to see some data as number and some as percentage. Is it possible? 

 

I tried some ways, but still got problem to find out.

 

Thank you very much

Barbora 

2 ACCEPTED SOLUTIONS
Thejeswar
Resident Rockstar
Resident Rockstar

Hi @Barculez ,

If you set your column data type to text, you can have both Numbers and Percentage in it.

 

But if you want to calculate using something and arrive at this, you might consider using some if condition and concatenat '%' symbol. But you need to try this to know if this will work.

 

Other option is you have two tables once with percentage values and other will Numbers. Append those tables and get your final table. Column data type should be text

 

Regards,

View solution in original post

v-yangliu-msft
Community Support
Community Support

Hi  @Barculez ,

 

Power bi does not support different data formats in the same column, this is the design of Power BI, but you can use the Format() function in Dax to customise the formatting of the data if you can accept that the column will be in text format and you only need to have the two data formats displayed in the column, which will not be used to perform aggregation operations.

Refer to:

FORMAT function (DAX) - DAX | Microsoft Learn

Column =
IF(
    'Table'[ID]<=3,
    FORMAT('Table'[Value],"General Number"),
    FORMAT('Table'[Value],"Percent"))

vyangliumsft_0-1700207640983.png

 

Best Regards,

Liu Yang

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

View solution in original post

2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

Hi  @Barculez ,

 

Power bi does not support different data formats in the same column, this is the design of Power BI, but you can use the Format() function in Dax to customise the formatting of the data if you can accept that the column will be in text format and you only need to have the two data formats displayed in the column, which will not be used to perform aggregation operations.

Refer to:

FORMAT function (DAX) - DAX | Microsoft Learn

Column =
IF(
    'Table'[ID]<=3,
    FORMAT('Table'[Value],"General Number"),
    FORMAT('Table'[Value],"Percent"))

vyangliumsft_0-1700207640983.png

 

Best Regards,

Liu Yang

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

Thejeswar
Resident Rockstar
Resident Rockstar

Hi @Barculez ,

If you set your column data type to text, you can have both Numbers and Percentage in it.

 

But if you want to calculate using something and arrive at this, you might consider using some if condition and concatenat '%' symbol. But you need to try this to know if this will work.

 

Other option is you have two tables once with percentage values and other will Numbers. Append those tables and get your final table. Column data type should be text

 

Regards,

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.

July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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