Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I would like to use the following code, but with the sum of the field assosiated with IntervalMatch. Is that possible?
// PriceGroup:
// LOAD * Inline [
// Start,Stop,PriceGroup
// 0, 99.99, 0-100
// 100, 499.99, 100-500
// 500, 999.99, 500-1000
// 1000, , Over 1000
// ];
// Join(PriceGroup)
// IntervalMatch(CataloguePrice)
// Load
// Start,
// Stop
// Resident PriceGroup;
// Drop Fields Start, Stop;
Sum of fields? can you elaborate with an example?
I would like to create two groups; revenue>500' and revenue<500'. The purpose is to count entities with revenue>500' pr. quarter.
// RevenueGroup:
// LOAD * Inline [
// Start,Stop,PriceGroup
// 0, 499000, less than 500'
// 500000, , more than 500'
// ];
// Join(RevenueGroup)
// IntervalMatch(Revenue) <----------------- This is where I need Sum(Revenue) or else the results are showing only single lines over 500'
// Load
// Start,
// Stop
// Resident PriceGroup;
// Drop Fields Start, Stop;
Forgot to change "PriceGroup", should be "RevenueGroup"
Why don't you create a new field before you do interval match?
Fact:
LOAD Entity,
Quarter,
....,
Revenue
FROM ...;
Left Join (Fact)
LOAD Entity,
Quarter,
Sum(Revenue) as TotalRevenue
Resident Fact
Group By Field1, Field2;
and now do interval match using Total Revenue....