Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm having 2 tables. One is master_calendar. Another is Fact table - Sales.
FIELDS IN TABLES
Master calendar = DATE, DAY, MONTH, YEAR, YEARMONTH, PREVIOUS7DAYFLAG.
Fact table Sales = SOURCE, DATE, CUSTOMER, REGION, SALES
DATE is the field which connects Fact & Master Calendar Table
In script PREVIOUS7DAYFLAG IS WRITTEN AS: If(%Date >= (Today()-7) and %Date < Today(), 1, 0) as PREVIOUS7DAYFLAG
SOURCE Field consist of data: Ordered , Invoiced
Requirement: Need to calculate Sum of Source - Ordered for last 7 days.
I tried with set expression : Sum({<Source={'Ordered'},Previous7DaysFlag={'1'}>}Sales). This is not working. Kindly help me to find out the correct expression.
Hi,
Make sure the formats of both dates i.e Date field in your table and Today() field should be in same formats and the expression you mentioned should work.