Showing results for 
Search instead for 
Did you mean: 
pe2950 Frequent Visitor
Frequent Visitor

Counting Rows By Week?

I'm having an issue counting rows by week...


I have two tables: Appointments, DateKey


  • Appointments
    • Each row has a [Counter] = 1
    • Each row has a  [CreateDate] = Date Row Created
  • DateKey
    • [Date] column containing all the dates
    • [Year-Week] column calculated as Year-Week = YEAR(DateKey[Date])&"-"&WEEKNUM(DateKey[Date])
    • [WeekNum] column calculated as WeekNum = WEEKNUM([Date])
  • Relationship
    • 1 DateKey[Date] - * Appointments[CreateDate], Crossfilter both


Trying to create a barchart with the weeks on the axis and the sum of appointments[count] as the value. It seems like its sorting it by the count from largest to smallest, instead of using the weeks to sort it by time. The DateKey table is marked as a Date Table with [Date] set. 


Super User
Super User

Re: Counting Rows By Week?

@pe2950 click on top right corner (3 dots) and in there choose the sort order and sort by column

Did I answer your question? Mark my post as a solution.

Proud to be a Datanaut! Appreciate your Kudos Smiley Happy
Feel free to email me with any of your BI needs.

Helpful resources

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 394 members 4,148 guests
Please welcome our newest community members: