Forum Discussion
FlorianF
3 years agoFrequent Visitor
Error null cannot converted to text (but there is no null value in column)
Hi guys, I have a strange error in Power BI. It says that a null value cannot be converted into text. But the column where the error disappears is not a datatype text, and also there is no null val...
- 3 years ago
Ok, update the highlighted section to be:
each try f_archivedEmails([id]) otherwise nullPete
BA_Pete
Super User
3 years ago
For your scenario, i.e. running the function as a source, you could try:
(Customer as number) =>
let
Quelle =
try
Json.Document(
Web.Contents(
"https://ffbc.weclapp.com/webapp/api/v1/archivedEmail?entityId="
& Number.ToText(Customer)
& "&entityName=party&pageSize=1000"
)
)
otherwise null
in
Quelle
Pete
FlorianF
3 years agoFrequent Visitor
Sorry I was wrong.
The number always has a value. The error come up, when the result of the function is empty. So I have to check if the result is empty and go to the next and write empty string in the columns of the query I use the function.
I think at this point, where the function will executed I have to check if the result is empty and continue with the next number.
- BA_Pete3 years ago
Super User
Ok, update the highlighted section to be:
each try f_archivedEmails([id]) otherwise nullPete