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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. 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
Super User
Super User

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
Super User
Super User

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
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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