Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
New to Bi. Just playing about. Thought I was doing the simplest thing in the world but apparently it's not.
I have just 1 table for simplicity. In my data there is a timestamp field. I wanted to create month and year columns based on this timestamp. How hard could it be?
I go to create a customer variable.
In the new column name box I put "year" because that seems a sensible name.
In the customn column formula I put = year([time])
BI then tells me there is no syntax errors have been detected. great stuff. should be no issues then. Oh wait. I click ok and it tells me that "Expression.Error: The name 'year' wasn't recognized. Make sure it's spelled correctly."
Apparently just finding information related to doing this type of query is impossible too so if anyone can just tell me how I can do this that'd be great.
Solved! Go to Solution.
Hi,
You can do this in the Query editor itself, just take a duplicate of the datetime column you have, then right click and go to below.
The custom column you add in Query Editor is based on Power Query syntax instead of DAX. So you should use "Date.Year()" function.
Regards,
Hi,
You can do this in the Query editor itself, just take a duplicate of the datetime column you have, then right click and go to below.
User | Count |
---|---|
91 | |
77 | |
71 | |
64 | |
58 |
User | Count |
---|---|
106 | |
97 | |
76 | |
63 | |
60 |