1 Reply Latest reply on Nov 13, 2016 9:04 AM by Marc MOUSSA

# Previous Month/Week

My cross tab report will show five columns.

3rd Column: Current Month Data (M) based on today's date

2nd Column: M-1

1st Column: M-2

4th Column: Movement [M-(M-1)]

5th Column: Upward/Downward Arrow based on positive and negative movement

Same for Weekly data (W, W-1, W-2).

How do I achieve this ? Shouldn't it be easy ?

• ###### 1. Re: Previous Month/Week

You use the datediff

3rd Column: Current Month Data (M) based on today's date : SUM(IF datediff('month', [DATE], TODAY()) = 0 THEN [SALES] END)

2nd Column: M-1 : SUM(IF datediff('month', [DATE], TODAY()) = 1 THEN [SALES] END)

1st Column: M-2 : SUM(IF datediff('month', [DATE], TODAY()) = 2 THEN [SALES] END)

4th Column: Movement [M-(M-1)] : difference between Then first two fields

5th Column: Upward/Downward Arrow based on positive and negative movement : IIF(Movement>0, 1, 0) Then you forms to 1 with an upward arrow and 0 for a downward arrow.

you'll need a dual axis to combine text and forms in a same table.

If you post a sample date i can show you how.

Hope this helps.