Forum Discussion
Learning PowerBI: Why do functions return "function" in a table, instead of actual "value"?
- 6 years ago
Hi Anonymous ,
I tried both scenarios in Power BI at my end.
- Created a custome column "test" using DateTime.LocalNow(). This gave me the current value in date-time format.
- Created a custom column "test1" usingDateTime.Date(DateTime.LocalNow()). This gave me the current value indate format.
Just wanted to check if you can paste screenshot of the FUNCTION message which you are getting while using DateTime.LocalNow() as I don't get any such message at my end?
If this helps and resolves the issue, appreciate a Kudos and mark it as a Solution! 🙂
Thanks,
Pragati
Hi Anonymous ,
I tried both scenarios in Power BI at my end.
- Created a custome column "test" using DateTime.LocalNow(). This gave me the current value in date-time format.
- Created a custom column "test1" usingDateTime.Date(DateTime.LocalNow()). This gave me the current value indate format.
Just wanted to check if you can paste screenshot of the FUNCTION message which you are getting while using DateTime.LocalNow() as I don't get any such message at my end?
If this helps and resolves the issue, appreciate a Kudos and mark it as a Solution! 🙂
Thanks,
Pragati
You were probably missing the " ( ) " at the end of the function.
If you call DateTime.LocalNow , the output is going to be Function
If you call DateTime.LocalNow(), the output is going to be the real current date, for example, 2024-08-05.
- JRD2 months agoFrequent Visitor
Thanks! That's what i was doing wrong