Forum Discussion
Broeselchen
3 years agoHelper III
Number to date
Ok, I'll try it this https://community.powerbi.com/t5/Desktop/Zahl-in-Datum-%C3%A4ndern-Zellen-mit-0-Werten/m-p/3008604#M1026104 in english: I want to change a number into a date. It only works, ...
- 3 years ago
Broeselchen You can replace with day as 01 if its 00. Use below code for it.
Kagdat_datum = var _day = if(int(RIGHT ( [KAGDAT], 2 ))=0,01,RIGHT ( [KAGDAT], 2 )) return IF ( [KAGDAT] = 0 || [KAGDAT] = BLANK() , BLANK (), DATE ( LEFT ( [KAGDAT], 4 ), MID ( [KAGDAT], 5, 2 ),_day) )
Broeselchen
3 years agoHelper III
No, there's nothing else.
Samarth_18
3 years agoCommunity Champion
Broeselchen is it possible for you to share PBIX file after removing sensitive data?
- Samarth_183 years agoCommunity Champion
Broeselchen You can replace with day as 01 if its 00. Use below code for it.
Kagdat_datum = var _day = if(int(RIGHT ( [KAGDAT], 2 ))=0,01,RIGHT ( [KAGDAT], 2 )) return IF ( [KAGDAT] = 0 || [KAGDAT] = BLANK() , BLANK (), DATE ( LEFT ( [KAGDAT], 4 ), MID ( [KAGDAT], 5, 2 ),_day) ) - Broeselchen3 years agoHelper III
Oh, now I made the list shorter and it works. So, you're right, there must be something in the dates. How can I finde the problem?
(I can't find a point to upload the csv...)
- Samarth_183 years agoCommunity Champion
Broeselchen you can upload it any drive and share it with open access or you can use website like https://wetransfer.com/
- Broeselchen3 years agoHelper III
- Samarth_183 years agoCommunity Champion
Hi Broeselchen , We are getting this error due to you have some date which are 00.
- Broeselchen3 years agoHelper III
Ok! And do you have any solution for this problem?
- Broeselchen3 years agoHelper III
Yes!!!! Thank you so much!