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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
karenrodang
New Member

Column with numbers and percentages

Hello,


I have a table with columns that have numbers and percentages on the same column, but I loose the format from the original table in excel.

 

I'm trying to make it look exactly the same because the percentages loose the % format.

 

Example:

 

ConceptQuarterQ1 2018Q2 2018Q3 2018
RevenueQ1 Locked Forecast286,249,297221,583,865302,742,560
RevenueQ2 Locked Forecast0212,961,075274,069,215
RevenueQ3 Locked Forecast00252,017,930
RevenueQ4 Locked Forecast000
Revenue8 Quarter308,232,834221,046,921222,337,635
Corp Adj Net Core Op IncomeQ1 Locked Forecast8,462,6741,812,65413,701,742
Corp Adj Net Core Op IncomeQ2 Locked Forecast0774,2637,805,105
Corp Adj Net Core Op IncomeQ3 Locked Forecast0010,025,566
Corp Adj Net Core Op IncomeQ4 Locked Forecast000
Corp Adj Net Core Op Income8 Quarter12,535,203668,6117,242,886
Core Adj Net Op Income %Q1 Locked Forecast2.96%0.82%4.53%
Core Adj Net Op Income %Q2 Locked Forecast 0.36%2.85%
Core Adj Net Op Income %Q3 Locked Forecast  3.98%
Core Adj Net Op Income %Q4 Locked Forecast   
Core Adj Net Op Income %8 Quarter4.07%0.30%3.26%
RevenueQ1 Locked Forecast156,110,99592,610,545127,754,216
RevenueQ2 Locked Forecast080,130,475112,922,580
RevenueQ3 Locked Forecast0069,591,743
RevenueQ4 Locked Forecast000
Revenue8 Quarter153,922,64975,511,99972,020,731

 

Is there a way to fix this? Tried formating the column in excel as text and didn't work.

 

Thanks

Karen

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

Hi karenrodang,

 

To achieve two different format in one column, you should convert type of values to text, click Query Editor-> Add Columns-> Custom Column and input M code like below:

= if [Q1 2018] = null then null else if [Q1 2018] <= 1 then Number.ToText([Q1 2018] * 100) & "%" else Number.ToText([Q1 2018])

捕获.PNG 

 

Regards,

Jimmy Tao

View solution in original post

3 REPLIES 3
v-yuta-msft
Community Support
Community Support

Hi karenrodang,

 

To achieve two different format in one column, you should convert type of values to text, click Query Editor-> Add Columns-> Custom Column and input M code like below:

= if [Q1 2018] = null then null else if [Q1 2018] <= 1 then Number.ToText([Q1 2018] * 100) & "%" else Number.ToText([Q1 2018])

捕获.PNG 

 

Regards,

Jimmy Tao

Hi Jimmy,

 

Thank you very much this definetely worked!!! Awesome!! 

 

Have one last question, now how do I reduce the number of decimals showing in the column? Can I do it in PBI or do I have to do that first in Excel?

 

Thank you!!!

prihana
Helper V
Helper V

This is not recommended at all. Please use seperate columns.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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