cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
herresa
New Member

Calculated column i sharepoint

The column i set to present the calculated value (differens between dates) as a number. Looking in the list it does!

But when I connect with PBI, it ends up as text!?  and with 14 decimals ! 

 

Need help to convert to integer (get a error message when trying this in modelling)

or

Cut the text length, because I cannot visualize with 14 decimals....

Thanks for any help. 

/Fred

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @herresa ,

 

Different computing engines in different services are different. This is the reason why the text of the calculated column in sharepoint is displayed in PBI. You can connect through PBI, and then create a new column using DAX or M query.

https://docs.microsoft.com/en-us/dax/datediff-function-dax 

https://community.powerbi.com/t5/Desktop/Calculate-difference-between-two-dates-power-query/m-p/6236... 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

5 REPLIES 5
V-lianl-msft
Community Support
Community Support

Hi @herresa ,

 

Different computing engines in different services are different. This is the reason why the text of the calculated column in sharepoint is displayed in PBI. You can connect through PBI, and then create a new column using DAX or M query.

https://docs.microsoft.com/en-us/dax/datediff-function-dax 

https://community.powerbi.com/t5/Desktop/Calculate-difference-between-two-dates-power-query/m-p/6236... 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

amitchandak
Super User IV
Super User IV

@herresa , I am assuming this a column at the sharepoint. Because in power query or dax Date1 -Date 2 is a duration.

 

Try to change the data type to decimal with 0 decimal places



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Thanks for adressing my problem. 

Yes its a Sharepoint list column that is calculated as the difference between two dates. After connecting to this list the data is seen as eg 244.00000000000000 as text. 

Did not work trying to change to a decimal type. 

It sais, Not possible to automatic convert the column to the type decimal

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Top Solution Authors
Top Kudoed Authors