Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
paulwalker
Creator II
Creator II

Need Help..?

Hi Community,

i need some help..

i have created master calendar, but i need week wise data (W1, W2, W3, W4, W5 and W6 also)

how to calculate Week's........

based on selection date i want display last 6 weeks data..

like W1, w2, w3 w4, w5 and w6.......

i am using this  'W'  &  Ceil(Day(Date)/7) as Week

it will show W1 to W5 only but i want to W6 also...

Hope you Understand............

9 Replies
paulwalker
Creator II
Creator II
Author

Hi All,

Suppose i have select one date (like   11/23/2014)

i want to show week wise data  ( W1, W2, W3, W4, W5 and W6 )

mruehl
Partner - Specialist
Partner - Specialist

There is a funktion called week().

It returns the week of a date.

paulwalker
Creator II
Creator II
Author

Please can you explain bit more..

i want show like this....

Capture.PNG

paulwalker
Creator II
Creator II
Author

is it possible.??

How to calculate 54 weeks.......

jagan
Luminary Alumni
Luminary Alumni

Hi,

Day() will return the number of day in the month, for example for Today(27-Nov) it will return 27, instead if you want to get the week of the year try like this

LOAD

*,

Week(TempDate) AS Week

FROM DataSource;

LOAD

*,

Ceil(DayNumberOfYear(TempDate)/7) AS Week

FROM DataSource;

Hope this helps you.

Regards,

Jagan.

paulwalker
Creator II
Creator II
Author

Hi Jagan,

in my chart i want to show only W1, w2, w3, w4, w5 and w6..

based on current selection..

LOAD *,

if(Date<=7,'W1',

if(Date>7 and Date<=14,'W2',

if(Date>14 and Date<=21,'W3',

if(Date>21 and Date<=28,'W4',

if(Date>28 and Date<=35,'W5',

if(Date>35 and Date<=42,'W6')))))) as Week;

is it possible like this.........

jagan
Luminary Alumni
Luminary Alumni

Hi,

Then try like this

LOAD

*,

Ceil(DayNumberOfYear(TempDate)/7) AS Week

FROM DataSource

Where DayNumberOfYear(TempDate) <= 42;


Hope this helps you.


Regards,

Jagan.

jyothish8807
Master II
Master II

Hi Paul,

The issue over here is, maximum possible weeks in a month is '5', so in your application when a new month starts its taking its as week1 again.

Regards

KC

Best Regards,
KC
paulwalker
Creator II
Creator II
Author

yes, based on selection..

i want to show past 6 week data .........

see this link i have posted clearly...........

Past 7 weeks data display