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

Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Summit Australia 2019

Summit Australia 2019

Travel to Melbourne and network with thousands of peers!

Top Ideas
Users Online
Currently online: 399 members 3,790 guests
Please welcome our newest community members: