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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
New Member

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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