Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago

Comparison between selected months/days/quarter/year/weeks with prior period

Hello Everyone,

 

I have researched so much for this and found many solutions, but none worked for me. Please help me resolve this.

 

I have a single table with date column, sales, client name, location etc. Now i want if i select 2 months( let say Feb 18 and Mar 18) so i want to know the sale of selected period and prior 2 months sales in other calculated measure( ie Jan 18 and Dec 17 in this case). Similarly if I select say 7 days from now, so i want 7 days sales before the selected period. So i want to do that comparison and also if I select, let say a client after selecting a date period, so then i want the sales of that client in the selected period with the same prior period.

 

So if i select paricular days range, so I want sales of same prior days range and if i select months range, so I want prior month range sales.Similarly for every range I select.

 

I have only one table with dates repeating but it is continuous as sales transaction happen daily.

 

Please help me with this. I will be really thankful.

 

Thanksnee

2 Replies