Forum Discussion
ISSUE SLOT
Hello,
Thank you for your help and reply first,
Please note that i still have this issue of sort in chronological order as you can see below:
Normaly the data should appears like this way: 06h-07h 07h-0h8 08h-09h 09h-10h 10h-11h 11h-12h .... so on till 17h-18h
which is not the case below even that i sort it by column within there time slot
Please advise how to solve this issue?
ayoubb ,
My bad, the regional settings on my computer are different check this code:
Column = VAR timeslot = FORMAT(HOUR('LAPOSTE'[Call start time]),"00")&"h-"&FORMAT(HOUR('LAPOSTE'[Call start time])+1,"00")&"h" return if(HOUR('LAPOSTE'[Call start time])>=6 && HOUR('LAPOSTE'[Call start time])<=17, timeslot,"")Issue on the dot comma ;
sorry
5 Replies
- MFelix
Super User
Hi ayoubb ,
The issue is regarding the formatting of your hours.
As you refer in the post you need to have 06h-07h 07h-0h8 08h-09h 09h-10h 10h-11h 11h-12h .. and what you have is 6h-7h 7h-8h 8h-9h 9h-10h 10h-11h 11h-12h the missing 0 makes all the difference you need to format that column with the additional zero, and the sorting will come out correctly.
- ayoubb
Helper IV
thank, this is the DAX that i'm using, could you help me to add 0 for 6,7,8,9
Column = VAR timeslot = HOUR('LAPOSTE'[Call start time])&"h-"&(HOUR('LAPOSTE'[Call start time])+1)&"h" return if(HOUR('LAPOSTE'[Call start time])>=6 && HOUR('LAPOSTE'[Call start time])<=17, timeslot,"")
here's the colum [Call start time]