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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

SOME decimal places not showing in data

I have combined two csv files to power BI and unpivoted the colums Monday to Sunday, named to Week Day and the values to Total Hours.   In some instances the data does not show the entire number: on original csv file shows 2.5 but on data model only 2; on csv. is 1.25 but shows 1, etc. 

I have changed the format  of all column to decimal, 2 cases, the local... replacing the values on the cell itself is not an option as  a new csv file with more rows added need to be uploaded to the model.

 

I tried to solve this by to get data from excel format, not combining files and not unpivot the columns columns, and I still get the incorrect total hours. Any suggestions to resolve this would be much appreciated. 

 

Capture1.PNGCapture2.PNG

1 ACCEPTED SOLUTION

Hi @Anonymous,

 

You are facing this issue becuase when you get data from csv it asks how to do the detect data type. By default it is "Based on firs 200 rows".
Becuase your top 200 rows in Saturday and Sunday do not have any decimal value, it assigns them Whole number data type

Data Type Dtection.png

 

 

Change this to Do not detect data types and Load. Then go to Edit Queries and manualy change the data types. See the video I made for you below to see how to set the data types once you have got the data in power bi.

 



If this helped you, please mark this post as an accepted solution and like to give KUDOS .

 

Regards,

Affan

 

View solution in original post

6 REPLIES 6
v-yuta-msft
Community Support
Community Support

Hi CarlaP,

 

Couldn't reproduce your issue on my side. Could you share your sample data for further analysis? In addtion, you may save your pbix file as excel file and then import the excel file into power bi and check if it can meet your requirement.

 

Regards,

Jimmy Tao

affan
Solution Sage
Solution Sage

Hi @Anonymous

 

Share your CSV file so that I can help you on this

Anonymous
Not applicable

Hi @Anonymous,

 

You are facing this issue becuase when you get data from csv it asks how to do the detect data type. By default it is "Based on firs 200 rows".
Becuase your top 200 rows in Saturday and Sunday do not have any decimal value, it assigns them Whole number data type

Data Type Dtection.png

 

 

Change this to Do not detect data types and Load. Then go to Edit Queries and manualy change the data types. See the video I made for you below to see how to set the data types once you have got the data in power bi.

 



If this helped you, please mark this post as an accepted solution and like to give KUDOS .

 

Regards,

Affan

 

How can I fix it once I've loaded the data already, built my report and updated later?

 

Here's my problem:

 

I've loaded some data two months ago, and built my report. The next month I added more data in the same column but Power BI didn't recognize this new data as decimal numbers and rounded up. So in the same column I have decimal and integer, but the correct should be decimal for all. Changing the data type doesn't seem to work. I've checked the dataset and it's correct.

Anonymous
Not applicable

Amazing, thank you very much!

 

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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