Forum Discussion
Is this a bug or is my function/transform wrong?
- 5 years ago
I'm not sure how you have calculated the "Age" (there is a function in Power Query which does this for you).
The code for this is:
SO if you need to calculate a difference between two date columns, just change the M code for the columns highlighted in yellow. (notice how the type is duration).
In your example, if you select your "Age" column (set it to type duration first), there is a function which calculates the age in "total days" (here it is with the corresponding code).
- 5 years ago
Hi WAB_Reports ,
Based on my test,it's ok to use "Text.beforedelimiter" function in power query to get the value you need:
But you should be sure that the Age column is a text format.
If your issue still exists ,would you pls upload your .pbix file to onedrive business and share the link with us?
Remember to remove the confidential information.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
I'm not sure how you have calculated the "Age" (there is a function in Power Query which does this for you).
The code for this is:
SO if you need to calculate a difference between two date columns, just change the M code for the columns highlighted in yellow. (notice how the type is duration).
In your example, if you select your "Age" column (set it to type duration first), there is a function which calculates the age in "total days" (here it is with the corresponding code).