Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Team,
I am trying to create a Date table with DAX as follows:
1 Date =
2 ADDCOLUMNS (
3 CALENDARAUTO(),
4 "Year", YEAR ( [Date] )
5 )
But I seem to be able to only enter the code on a single line as follows:
Solved! Go to Solution.
@mibu make sure to hold down the SHIFT button if you want to go to another line 🙂
When typing measures / calculated columns / tables, you need to hold down the SHIFT and then hit ENTER to go to a new line.
Hope that helps 🙂
Theo
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
Hi @mibu
If you go here: https://dax.guide/calendarauto/
I believe you are not putting the comma , at the end to show that another column needs to be added.
1 Date =
2 ADDCOLUMNS (
3 CALENDARAUTO () ,
4 "Year", YEAR ( [Date] ) , // The comma here to the left needs to be added then you can add more columns
5 )
Theo
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
Hey Theo, thanks for the link... very helpful.
My issue though... is that when I enter DAX I seem only to be able to do it on a single line... rather than being able to enter on multiple lines... by hitting Return after each entry... do you know how I can get Power BI Desktop to allow me to code on multiple lines... instead of on a single line...
Attached is what it looks likeOnly able to code on a single line in Power BI Desktop
@mibu make sure to hold down the SHIFT button if you want to go to another line 🙂
When typing measures / calculated columns / tables, you need to hold down the SHIFT and then hit ENTER to go to a new line.
Hope that helps 🙂
Theo
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
Thank you sir! Appreciate it! best, mibu
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
73 | |
72 | |
38 | |
31 | |
26 |