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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
jcastr02
Post Prodigy
Post Prodigy

Days of week count from three different tables

I have three different tables with requests coming into our business.  I need to be able to visually show on graph the number of requests depending on the day of the week.  Each table has a column for day of the week (Mon, Tues, Wed, etc.) but I don't know how to tie/count all three together so the graph just shows as total count.  

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

Hello @jcastr02 

You can create a table in your model with the following code

Days = 
DATATABLE (
    "Day of week", STRING,
    "Order", INTEGER,
    {
        { "Sun", 1 },
        { "Mon", 2 },
        { "Tue", 3 },
	{ "Wed", 4 },
	{ "Thu", 5 },
	{ "Fri", 6 },
	{ "Sat", 7 }
    }
)

Then join each of your data tables to this Days table.  Then you pull the [Day of week] from this days table into your visual and that will let you count, by day, the number of lines in each of your 3 data tables.

daysofweek.jpg

 

I have attached my sample file for you to look at.

View solution in original post

1 REPLY 1
jdbuchanan71
Super User
Super User

Hello @jcastr02 

You can create a table in your model with the following code

Days = 
DATATABLE (
    "Day of week", STRING,
    "Order", INTEGER,
    {
        { "Sun", 1 },
        { "Mon", 2 },
        { "Tue", 3 },
	{ "Wed", 4 },
	{ "Thu", 5 },
	{ "Fri", 6 },
	{ "Sat", 7 }
    }
)

Then join each of your data tables to this Days table.  Then you pull the [Day of week] from this days table into your visual and that will let you count, by day, the number of lines in each of your 3 data tables.

daysofweek.jpg

 

I have attached my sample file for you to look at.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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