Forum Discussion
alevandenes
5 years agoHelper IV
Add weekday to hierarchy
Hi, In the column of a table graph i have a hierarchy (month, day) - as shown below. I would like to specify also the weekday (mon, tue, wed, thu, fri, sat, sun). I have tried different options,...
- 5 years ago
alevandenes You can use this way .
step 1 : Create a Calender using below dax .Calender = ADDCOLUMNS( CALENDAR(MIN(data[Order Date]),MAX(data[Order Date])),"Year",YEAR([Date]), "Monthnum",MONTH([Date]),"Month Name ", FORMAT([Date],"mmmm"), "Day", DAY([Date]),"Day of Week ", FORMAT([Date],"dddd"))
and create a custom hierarchy like month name , Day ,day name . then drag that in your calculation matrix .
* Tested on a sample public datasetor Step 2 Create A new column using these dax function .
"Day of Week ", FORMAT([Date],"dddd").
amitchandak
5 years agoSuper User
alevandenes , You might have to create a date table and create a custom hierarchy
Custom Hierarchy
https://stoneridgesoftware.com/creating-hierarchies-in-power-bi/
https://www.youtube.com/watch?v=x6vXVJZ_eTY