Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crosstab - order of column problem 1

Status
Not open for further replies.

timbaktuu

Programmer
Jan 19, 2011
23
US
Hi all,

I am making a crosstab report where the columns will grow based on timestamp like 1/11/2011, 1/12/2011, I need to show weekday instead of 1/11/2011 like Tuesday, for that I am using formula

So when I sort the column by timestamp its all right, but when I try to do "Tue" thing it shows on column Mon, Thurs, tue, wed.

I tried formula:---

if dayofweek (timestamp)=1 then "Sun" and so on
but everytime the thursday comes before tues.like all jumbled up. Please help.

Thanks
 
Use your timestamp field as the column and then click on group options (within the crosstab expert)->options tab and check "customize group name"->use a formula->x+2 and enter:

weekdayname(dayofweek(currentfieldvalue),true)

Note that while this will be in the right order, if you have more than one week of data, the column names will repeat. So are you working with multiple weeks and want different dates grouped under the same day of week? Or does the above meet your needs?

-LB
 
Thanks so much. I have to show for a week only. I am going to try this. thanks.
 
PS. Actually the formula should be:

weekdayname(dayofweek({table.date}),true)

I don't think currentfieldvalue works in this case.

-LB

 
Thanks a ton LB. Appreciate your help. That worked like charm !!!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top