Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi Team,
I want to display the visual like below
Instead of below
I want week starts from Monday to sunday..
How to do the same..
Thnaks in advance
Solved! Go to Solution.
Hi @Narasimha
If you go into the Query Editor and then the Date table.
Click on Add Column in the ribbon and then click on Custom Column, and give it a name.
Put in the following code below.
Date.ToText(Date.StartOfWeek([Calendar Date], Day.Monday),"MM/dd") & "-" & Date.ToText(Date.EndOfWeek([Calendar Date], Day.Monday),"MM/dd")
This will then create the column you require.
Hi @Narasimha
What I would suggest is to create a Date table, then create a relationship from your current table to the Date table.
Once you have the date table you will see that there are a whole lot of extra columns which you can use, or even create. After which you can then use any of those columns for your visual.
Thanks For the update guavaq..I was created Date table and created relationship b/w date table and our data table. 2nd visual i was created using date table with below query
Week1 = CONCATENATE("Week-",WEEKNUM(DimDate[Date],2))
here in above dax, 2 means week starts from monday..
That is great going, do you now have it in the format you require?
No.. I want to create Line chart using power bi desktop with below x axis date format instead of Week1, Week2,Week3
Note : Above visual was created using Excel
Ok, so if you go back into the Query Editor you can add a new column where you can then create the values for each week as per your image into this new column.
Then you can use this column for your visual?
Can i have sample DAX formual?
Hi @Narasimha
If you go into the Query Editor and then the Date table.
Click on Add Column in the ribbon and then click on Custom Column, and give it a name.
Put in the following code below.
Date.ToText(Date.StartOfWeek([Calendar Date], Day.Monday),"MM/dd") & "-" & Date.ToText(Date.EndOfWeek([Calendar Date], Day.Monday),"MM/dd")
This will then create the column you require.
Hi @GilbertQ,
Am getting below error while trying to create new column in Date table. Could you please help me out.
You forgot to go into the Query Editor.
The code from @GilbertQ is Power Query (M), not DAX.
User | Count |
---|---|
86 | |
84 | |
69 | |
67 | |
55 |
User | Count |
---|---|
125 | |
100 | |
90 | |
84 | |
66 |