Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
alevandenes
Helper IV
Helper 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, but i never get what i am actually looking for. Any ideas on how to tackle this?

alevandenes_0-1616409577168.png

 

1 ACCEPTED SOLUTION

@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 dataset 
HarishKM_0-1616421004250.png

or Step 2 Create A new column using these dax function .

"Day of Week ", FORMAT([Date],"dddd").

View solution in original post

4 REPLIES 4
HarishKM
Impactful Individual
Impactful Individual

@alevandenes You can go to transform data then click on

table name => Work data coloumn => Add coloumn then date => name of the day => you will get name of the day column name => close and apply once loaded then drag that in your work date slicer =>Bingo..

HarishKM_0-1616410582203.png
Final solution :

HarishKM_1-1616410708858.png

 

 

Hi @HarishKM 

this is my starting point (see screenshot below). the thing is i dont want to lose the day number. I would like to see both that and the weekday. 

alevandenes_0-1616419294046.png

in the way that you proposed, results would be grouped into weekdays but in this case i would like to keep them separated into days

 

Thanks a lot already for your support on this

Kind regards,
Alessandra

@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 dataset 
HarishKM_0-1616421004250.png

or Step 2 Create A new column using these dax function .

"Day of Week ", FORMAT([Date],"dddd").
amitchandak
Super User
Super 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

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.