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.
I am trying to create a calculated column in DAX Query view ( not in power Query Window) .Its simple , columns should get value as weekday or weekend , depending on day of the week.
Find below the code snippet
Hi @abhinav_k18
Just as @Greg_Deckler said that this dax should work fine.
If you can share your data(exclude sensitive data) or create some sample data, so that we can help you better.
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi v-zhengdxu-msft,
The data i have is like this , i want to create a new calculated column [Day Type], which will have 2 distinct type of values , Weekend if (day number of week is 1 or 7) , otherwise Weekday.
Kindy Help
ID | DayNumberOfTheWeek |
1 | 1 |
2 | 7 |
3 | 4 |
4 | 2 |
5 | 6 |
6 | 3 |
7 | 1 |
8 | 5 |
9 | 2 |
10 | 1 |
@abhinav_k18 @v-zhengdxu-msft In DAX Query view I immediately get an error just trying DEFINE COLUMN.
@abhinav_k18 Not sure DAX Query View is fully baked. That query seems to work in DAX Studio but not in DAX Query View.
User | Count |
---|---|
48 | |
44 | |
19 | |
14 | |
14 |
User | Count |
---|---|
107 | |
55 | |
28 | |
19 | |
14 |