Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a data set of historical sales data that has a field called 'aggDAY'. Also in this set is a field called 'aggREV'
I also have a data set of current data with a field called 'DAY' as well as a field called 'REV.'
I want to create a table / chart that has 'DAY' as the dimension, with an expression for SUM(REV) that compares to the aggREV for the given day.
Ideally, i want to create a bar chart that has day across the bottom, with columns showing the rev by day and and a marker showing where that falls in relation to the historical average.
Fact:
LOAD DAY, REV, 'current' as Source
FROM CurrentData;
Concatenate (Fact)
LOAD aggDAY as DAY, aggREV as REV, 'agg' as Source
FROM AggData;
In your chart:
Dimension: DAY
two expressions:
=Sum({<Source = {'current'}>} REV)
=Sum({<Source = {'agg'}>} REV)
maybe create a concatenated single table made of your two tables, renaming the aggDay to Day and aggREV to REV and creating a new field that indicates 'agg' resp 'current' data.
This allows you to use DAY as dimension and filter your REV values by the new field.
How do you do that within a script?
Fact:
LOAD DAY, REV, 'current' as Source
FROM CurrentData;
Concatenate (Fact)
LOAD aggDAY as DAY, aggREV as REV, 'agg' as Source
FROM AggData;
In your chart:
Dimension: DAY
two expressions:
=Sum({<Source = {'current'}>} REV)
=Sum({<Source = {'agg'}>} REV)