Forum Discussion
Sorting week is not working
- Anonymous7 years ago
VPonnarath,
Please update your formula to the following, then change data type of week sort column to whole number.Week Sort Column = CONCATENATE('Date'[Calendar Month Number],'Date'[Week Number of Month])
This way, when you sort Week Name-Month column by Week Sort Column, you will get expected sort.
Regards,
Lydia
i think your sort column should be
MM-Week Number of Month, like
01-01
01-02
01-03
...
12-01
12-02
12-03
And use this new field to sort your "Week Name-Month" field
Hello, Actually, that didnt work. :)
When i was testing with my sample data, it was working for me. But, when we uploaded the real data for whole year, the week name is not sorting in an order.
Can you please give me another solution for this?
Thanks,
- parry2k7 years agoSuper User
ok so what is the issue. I guess you need to add more value in sort column but if you provide more details it will be helpful to resolve the issue.
thanks,
p
- VPonnarath7 years agoFrequent Visitor
Okay. I will try to explain as I can.
I am trying to bring the week name ( ex: Jan-Week 1, Jan-Week2) in a line chart X axis.
I have date table with , Week number of Year, Week Number of Month columns . I created a calculated column for dispaying the week number in a more understandable way , ie.. Jan-Week1, Jan -week2 . Below is the dax I am using for this.
Week Name-Month = CONCATENATE('Date'[Fiscal Month],CONCATENATE("- Week",'Date'[Week Number of Month]))
I need to sort this cloumn like below
Jan-Week1
Jan-Week 2
...
...
..
Feb-Week1
Feb-Week 2
Uploading the pbix with date table here.. pbix
- Anonymous7 years agoNot applicable
VPonnarath,
Please update your formula to the following, then change data type of week sort column to whole number.Week Sort Column = CONCATENATE('Date'[Calendar Month Number],'Date'[Week Number of Month])
This way, when you sort Week Name-Month column by Week Sort Column, you will get expected sort.
Regards,
Lydia