MasterCalendar: LEFT KEEP(InvoicesAndDeliveries) Load DayStart(Floor(Num(TempDate))) AS 'CalDate', WeekEnd(TempDate) AS WeekEnding, ; //=== Generate a temp table of dates === LOAD date(mindate + IterNo()) AS TempDate, mindate, maxdate // Used in InYearToDate() above, but not kept WHILE mindate + IterNo() <= maxdate;
//=== Get min/max dates from Field ===/ LOAD min(FieldValue('CalDate', recno()))-1 as mindate, max(FieldValue('CalDate', recno())) as maxdate AUTOGENERATE FieldValueCount('CalDate');
EXIT Script ;
What I want to see is a Barchart with the WeekEnding as it's dimension, and the Sum(DetailAmt)/Sum(TravelMiles) as the measure.
With my live data, I have the Calendar as the dimension, and I have the Sum(DetailAmt)/Sum(TravelMiles) so I get something like this.
But once I add the "DetailCode", my data goes away.
The reason I assume that my data is going away is because I'm putting a dimension that comes from a detail table. And of course, since Orders don't map to the InvoiceDetails, my Sum(TravelMiles) term becomes nonsensical.
I've tried. SUM({1}[Order Total Travel Miles]) but that doesn't help either. I'm at a loss as to what to do.