Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a week column from excel and i have sales and super sales... Now i need show data for previous week.
The formula for calculating is sales/supersales for previous week.
Can you please help me on this.
Thanks,
Bharat
your weekfield is a datefield, so you Need to define a new field
for example:
Sales:
load * Inline [
Brand, Week, Sales, SuperSales
A, 12.07.2015, 2836, 118
A, 14.12.2015, 2242, 106
A, 21.12.2015, 3751, 147
];
left join(Sales)
load *,
week(Week) as WeekNr
Resident Sales;
then you can use this Expression:
=sum({<WeekNr={'$(=max(WeekNr)-1)'}>}Sales/SuperSales)
you my use eitehr Week or WeekNr as dimension
if you use a mastercalendar (the best choice anyway) you may Need the weekfield from mastercalendar
Thanks a lot
Hi,
In scripting,
Sales:
LOAD Brand,
Week,
Sales,
[Super Sales],
week(Week) as WeekNum
FROM ....
In expression,
=sum({<weeknum={'$(=max(weeknum)-1)'}>}Sales/[Super Sales])
-Joyson G