Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello everyone,
I've just started using PowerBI (literally about half an hour ago), and the tutorial data that I'm using is showing DayOfWeek for 1-1-1999 as 4th day of the week, and the column also contains 0s as day of the week. Now 1-1-1999 was a Friday, so I'd really love it if the dataset could show me Friday as 5, Sunday as 7 and Monday as 1.
Is there a newbie-friendly way of doing this? Or should I come back to this after I've leartned R / M / Python / DAX (whichever applies)?
Solved! Go to Solution.
Hey,
unfortunately it's not that easy (w/o knowing M, DAX, R, or Python) to change this 🙂
Kidding, just a little DAX is necessary
I guess you have a separate table that represents the complete calendar.
The problem you are facing, is the following: the creator of the data that your are using created this calendar table, was thinking that Monday is best represented by 0. I also met a person decades ago that was thinking a similar thing, maybe it was the same person.
If you dare you could create your own (maybe your first calculated column by doing the following:
my Week starts on Mondays counting 1 = WEEKDAY('Calendar'[Date],2)
This will create a new column in your table, here is a screenshot that shows me entering the formula with the available options of the formula WEEKDAY
Please be aware that the learning track/material you are following may contain exercises that for some reason expect that Mondays count as 0.
Happy learning
Tom
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |