What I want?
Get all Customers from a certain city that made an order from the same city on a certain date range and made the order from the same city at any Date before this certain Date range.
What I did?
I tried was to Create 3 Parameters, one that holds the Certain Order_Date called "Certain_Date", one that Hold the End Date of a Date Range I want to see called "End_Date" and one that holds the Name of the city "Certain_City".
Here my Calculation field:
IF { FIXED [Customerid], [Certain_City] : MIN(Order_Date) < [Certain_Date] }
AND { FIXED [Customerid], [Certain_City] : MAX(Order_Date) >= [Certain_Date]}
THEN "Customer Ordered from City before"
ELSE "Customers first Order from this City"
END
This Calculated field, however, does not work, it only gets me the Customers that made an order from any City before.
Also, I used a Filter to show only the CustomerID-s that ordered from the Certain_Date to the End_Date. But it won't work, any Ideas?
Here An Example of what I want:
> Order_Date Customer_ID City
> 01.10.2016 1234 Stockhom
> 01.05.2016 1234 Stockhom
> 01.03.2016 1234 Oslo
> 05.10.2016 1455 Berlin
> 01.04.2016 1455 Berlin
> 02.10.2016 1211 Stockhom
> 06.03.2016 1211 Prague
Let say the "Certain_Date" is 01.10.2016 and the "End_Date" is 03.10.2016
From this Data I want to create a Barchart that holds the Number of Unique CustomerID-s, and that colors the "Customer Ordered from City before" and the "Customers first Order from this City".
In this Example the Barchart would go up to 3 Elemnts. Where the CostumerID-s 1234 and 1455 would be colored Blue because they ordered from the same City before, and 1211 would be colored Red because it ordered before the Date but not from the same City.