• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Removing Last 2 digits from sql database

Jacques Naude

New Member
Hallo
My problem sounds simple, but I am failing to resolve.
My data source is from SQL
I used LEFT and LEN functions in PowerPivot to get this 2 columns
However, If I format them, only the smaller amounts gets formatted correctly
See the 1000 separator, They are all formatted like the attached Picture

The original Columns which doesn't contain the LEFT and LEN functions, can format correctly
 

Attachments

  • upload_2016-7-12_12-56-52.png
    upload_2016-7-12_12-56-52.png
    247.3 KB · Views: 12
You can do few things.
1. You can write SQL query (edit source of the query) and use Convert() function or other appropriate data transformation funtion.

upload_2016-7-12_9-37-19.png

2. In Query Editor do one of following or all as needed
- Change column type to one of the appropriate numeric types
- Add calculated column.

EDIT: If going with method 1, you may need to do additional transformation at PowerQuery/Pivot level.
 
Last edited:
PowerQuery should be able to help with this transformation and feed the data model. I've only used it sparingly, but this is one of the examples of use often suggested.
 
Back
Top