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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

Getting day name using calender table created using Dax

I created small Calender table using below. 

Calendar = CALENDAR(DATE(2021,5,1),DATE(2021,05,14))
 
Then created a new measure for day name of the week using below ;
Day of Week Name = FORMAT('Calendar'[Date],"dddd")
 
I have another data source with 'date' column .(source - Daily Click Data
 
Now simply i want to draw a bar grapg indicating the counts from daily click data source for different days names of the week (as in sunday how many counts , monday how mant , etc? ) 
But how can I join my calender table with the 'Daily Click Data ' source and draw this graph ?
 
1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@Anonymous 

You should add as a new column not a measure to your calendar table: 

Create a new column in your column in your calendar table with 

Day of Week Name = FORMAT('Calendar'[Date],"dddd")

Then, create a relationship between the Calendar[Date] and Daily Click Data table

 

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

3 REPLIES 3
RealSlimShady
Regular Visitor

Hey guys,

 

There is an easier way to do this, and Power bi will still recognize it as a date! (It will sort monday to friday instead of alphabetical.)

Create a new column

Day of Week Name = [Date]

[Date] is whatever the column name is of the date you want abbreviated.

In column tools, First make sure the Data type of the new column is date, then  with the new column selected, type ddd into the format box. (It won't suggest it but you can still type it manually.) hit enter and boom there it is.......

You can type out any date format you want. from here:  https://learn.microsoft.com/en-us/dax/format-function-dax#custom-datetime-formats

I just stumbled across this on accident. I have never seen anyone else suggest this method on any forums.

Hopefully this helps .

 

SlimShady

Fowmy
Super User
Super User

@Anonymous 

You should add as a new column not a measure to your calendar table: 

Create a new column in your column in your calendar table with 

Day of Week Name = FORMAT('Calendar'[Date],"dddd")

Then, create a relationship between the Calendar[Date] and Daily Click Data table

 

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Mohammad_Refaei
Solution Specialist
Solution Specialist

Day Of Week Name could be added as a column to your Calendar table which I assume has a relathionship to source - Daily Click Data table. In your chart use the day name from the Calendar table and aggregate the click values from the daily click data table.

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors