Forum Discussion
Fiscal Week Calendar Help
Hi Anonymous
Table 1: is the selection of people who were sent communications. Every one was sent the communication on the same day so the date will be static.
Table 2: Is the sign ups with amount paid and othe related financial information
Both tables are tables in SQL Server.
Thanks
Hi Anonymous
Try this
ByWhichWeek = Calculate( WEEKNUM(MIN([SignUp]))
- WEEKNUM( MAX(Table1[Date]))
)
This assumes there is only one row in Table 1 and many rows in Table1 and both are not related.
Is this what you expected.
Cheers
CheenuSing
- Anonymous7 years agoNot applicable
Anonymous wrote:Hi Anonymous
Try this
ByWhichWeek = Calculate( WEEKNUM(MIN([SignUp])) - WEEKNUM( MAX(Table1[Date])) )This assumes there is only one row in Table 1 and many rows in Table1 and both are not related.
Is this what you expected.
Cheers
CheenuSing
Hi Anonymous This seems to do the trick, thanks.
FYI: not sure if the below will make a difference to the code as it seems to work perfectly.
There is more than one row and more than one column in Table 1, but the Date in Table 1 is static. Table 1 is communication Selection so includes what type of Comms they received, Customer ID
Date in table 2 is dynamic.
Table 1 and Table 2 have a relationship based on Customer ID.
- Anonymous7 years agoNot applicable
Hi Anonymous
Here's a question for you. There are a few rows, around 5 that exist in table 2 but not table 1. This causes the calculation to be wrong. Is there a way to use a fixed date if (Table 1)[Date] does not exist.
Otherwise I was thinking to add a column in the table 2 for Date as it will be static and use the below formula however the 40 is static.
ByWhichWeek =VAR __fw = [Date] - 40 + 1RETURN IF(__fw<=0,52+__fw,__fw)Thanks- Anonymous7 years agoNot applicable
Hi Anonymous ,
Can you please upload some data for Table1 and Table2 and the output expected on Goodlge / One Drive and share the link here to find the right solution.
Cheers
CheenuSing
- Anonymous7 years agoNot applicable
Anonymous wrote:Hi Anonymous ,
Can you please upload some data for Table1 and Table2 and the output expected on Goodlge / One Drive and share the link here to find the right solution.
Cheers
CheenuSing
Hi Anonymous
So there are two options, I can either use two tables or I can append a column of Date Sent into a single table, now called Table 3, then I do not need to use Table 1 or Table 2.