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.
Hi, I'm very new to Power BI, but I need to solve this little problem.
I have a set of number
s as data in a table in power bi
Example:
19001001
19001002
19001003
19002001
19002002
19002003
Where the first 2 digits (19) represent the year
The next 3 digits (001) represent the day of the year
and the last 3 (001) represent the part number on the day
I need to calculate the date in year and month, from the first 5 digits.
I would greatly appreciate your help, thank you.
Solved! Go to Solution.
Hi @Anonymous
try a new calculated column
Column =
var yearstart=date(2000+left([LotnameSN];2);1;1)
var days = value(mid([LotnameSN];3;3))-1
return
yearstart+days
do not hesitate to give a kudo to useful posts and mark solutions as solution
Hi @Anonymous
try a new calculated column
Column =
var yearstart=date(2000+left([LotnameSN];2);1;1)
var days = value(mid([LotnameSN];3;3))-1
return
yearstart+days
do not hesitate to give a kudo to useful posts and mark solutions as solution
@Anonymous
it looks like you have an empty values in LotsnameSN column or values which start with space " " symbols. please, check
do not hesitate to give a kudo to useful posts and mark solutions as solution
@az38
I had no empty data but one was wrong.
It no longer gives me an error, but does not show information.
@Anonymous
it works for me on your data sample. we need debug
try to create column
yearstart=date(2000+left([LotnameSN];2);1;1)
or share pbix-file on https://uploadfiles.io/ for example
do not hesitate to give a kudo to useful posts and mark solutions as solution
Export the data from the table to a CSV and open it and in the cvs if you show me data the same thing I did with the formula,
and gave me the same result.
startstart = date (2000 + left ([LotnameSN]; 2); 1; 1)
if the formula works, but it is my power bi that does not show the information.
and that column occupied it in the power query editor, does it do the same?
@Anonymous
share pbix-file, please, with data loaded into
do not hesitate to give a kudo to useful posts and mark solutions as solution
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
100 | |
88 | |
69 | |
61 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |