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
Anonymous
Not applicable

Not converting percentages while loading data

I have this following table as my input file to powerBI that has both decimals and percentages in a field:

EashwarBalaji_0-1687429611366.png

Is there a way to bring this up without converting everything to decimal in powerBI?

EashwarBalaji_1-1687429681775.png

 

Right now, everything converts to decimal without making any transformations. I dont want to change all the values to percentages.

1 ACCEPTED SOLUTION
DOLEARY85
Resident Rockstar
Resident Rockstar

Hi,

 

try this measure, essentially you need to select the KPI to link the associated format to it:

 

Value Measure For Multiple Data Formats = IF(OR(CONTAINSSTRING(SELECTEDVALUE('Table (2)'[KPI]),"X"),CONTAINSSTRING(SELECTEDVALUE('Table (2)'[KPI]),"Z")),FORMAT(SUM('Table (2)'[Values]),"#%"),FORMAT(SUM('Table (2)'[Values]),"0.00"))
 
DOLEARY85_0-1687430423995.png

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

View solution in original post

3 REPLIES 3
v-rzhou-msft
Community Support
Community Support

Hi @Anonymous ,

 

As far as I know, Power BI is calculated based on columns, so there will be only one data type/data format in each column. 

 

So when you load the data with percentage type or decimal number type into Power BI, there will be only decimal number type on this column.

 

You can try FORMAT() function as their suggestions. However, your column will be convert to text type due to this function.

 

Best Regards,
Rico Zhou

 

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

 

 

 

DOLEARY85
Resident Rockstar
Resident Rockstar

Hi,

 

try this measure, essentially you need to select the KPI to link the associated format to it:

 

Value Measure For Multiple Data Formats = IF(OR(CONTAINSSTRING(SELECTEDVALUE('Table (2)'[KPI]),"X"),CONTAINSSTRING(SELECTEDVALUE('Table (2)'[KPI]),"Z")),FORMAT(SUM('Table (2)'[Values]),"#%"),FORMAT(SUM('Table (2)'[Values]),"0.00"))
 
DOLEARY85_0-1687430423995.png

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Kishore_KVN
Super User
Super User

Hello @Anonymous create a new column and its calculation looks as below:

If(KPI = "Z', FORMAT('TABLE'[VALUES],"0%"), 'TABLE'[VALUES])

this will create new column and only Z will be converted not all others. 

 

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

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.