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
knotpc
Advocate I
Advocate I

When Importing from API's Percentage Values are Importing as Text

Having trouble importing from two different API's. The first is OECD.org, the second is stlousifed.org. I am able to successfully import data in tables. The problem I am having is that values coming from the API's for percentages are imported as "text" by Power Bi - Power Query Editor. 

 

For example 4.2 imports as text. The values need to be stored as 4.2%. The problem I am having is trying to transform them. If I select Transform - Data Type - Percentage Power Query Editor and Power Bi convert 4.2 (text) to 420.00%, which is not the correct value. As a workaround, I changed the [Value] type Text to Decimal, then I created a third calculated column called Percent = DIVIDE([Value],100) and then I Transform it to %. For a short term fix, this works kinda. Long term, as I intend to connect to numerous API's that provide the same values it will make the import tedious, not to mention storing extra unnecessary columns. 

 

Any suggestions on how to resolve this using Advanced Editor functions that do not include creating calculated columns would be much appreciated. Below is some example date. Note: Each table to the left, save the "Formulas", one is an API call. Every one of them has a percentage number is stored as "text" during import. 

 

Civilian Unemployment.PNGProducer Price Index Example.PNG

 

 

 

 

 

0 REPLIES 0

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.