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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
gobluemba
Helper I
Helper I

Percentages not showing correctly from Excel to PowerBi - Any help greatly appreciated!

Hi,

So I created a table initially in Excel and imported it into PowerBi. Percentages looked perfectly fine in the PowerBi table. 

However, when I manually added another column (Jun-20) data in Excel, when I imported the data, it will not show up as the correct percentage in the PowerBi table.  It definitely is importing the data (34 will show up as 3400%). I tried using .34 but it then shows up in powerBi as .00. This only happens with data that I created AFTER the initial import. Any thoughts on what I am doing? I feel this is a ridiculously easy fix, but just not seeing it. See screen captures from Excel. Thanks in advance!

Adam Here is the data formatting in PowerBiHere is the data formatting in PowerBiThis is the newly added data in ExcelThis is the newly added data in ExcelFor some reason the newly added data in Excel rounds to 00For some reason the newly added data in Excel rounds to 00

1 ACCEPTED SOLUTION

@gobluemba , Try this. Open data Transformation /edit query .

There you will have table name in left pane.

Right click on a table and open Advance Editor.

Check data type there.

You will code like
let
    Source = Excel.Workbook(File.Contents("C:\Users\Amit.Chandak\Dropbox\power bi\decimal.xlsx"), null, true),
    Sheet1_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data],
    #"Promoted Headers" = Table.PromoteHeaders(Sheet1_Sheet, [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Number", type number}, {"Number1", type number}, {"Name", type text}})
in
    #"Changed Type"

 

Change data type to number, it it not a number

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@gobluemba , in the first screenshot when Jun -20 was highlighted, % should also be selected under format. Please click on that % icon. It will a darker shade of grey once selected 

@amitchandak 

Hi, I did that, but it still doesn't show the percentages correctly. They all show 0.00%. Its weird. When I set the table up initially, cells that were populated with percentages worked out perfectly fine. However, when I added percentages tot he excel sheet AFTER I had created it, I have this issue. 4.JPG

@gobluemba , Try this. Open data Transformation /edit query .

There you will have table name in left pane.

Right click on a table and open Advance Editor.

Check data type there.

You will code like
let
    Source = Excel.Workbook(File.Contents("C:\Users\Amit.Chandak\Dropbox\power bi\decimal.xlsx"), null, true),
    Sheet1_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data],
    #"Promoted Headers" = Table.PromoteHeaders(Sheet1_Sheet, [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Number", type number}, {"Number1", type number}, {"Name", type text}})
in
    #"Changed Type"

 

Change data type to number, it it not a number

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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