Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm having problems trying to compare the data from two different time periods. I know there are already many similar topics, but I just can't solve it.
I would like to see comparatively newer and older data on one graph, but only the dimension of newer data.
Not like this on photo, that there is just one graph.
You can concatenate both tables.
Using GraphicYearMonth as dimension and applying set analysis to make two metrics, you can do it using the field origen (Sum({$<Origen = {'SALES'}> }JobOrderQuantity_KG)).
Regards
SALES:
LOAD 'SALES' as Origen,
"ProfitCenter"
,"ItemCategoryCode"
,"JobOrderQuantity_KG"
,Dual(num(Month(DeliveryDate)) & ' / ' & Year(DeliveryDate),year(DeliveryDate) & num(month(DeliveryDate), '00')) as YearMonth
,num(Month(DeliveryDate),'00') & ' / ' & Year(DeliveryDate) as GraphicYearMonth
from [$(DataFolderName)/SALES.qvd] (qvd)
where
DeliveryDate >= Date(MonthStart(Today(), -5))
;
Concatenate
LOAD 'LAST_YEAR' as Origen,
"ProfitCenter"
,"ItemCategoryCode"
,"JobOrderQuantity_KG"
,Dual(num(Month(DeliveryDate)) & ' / ' & Year(DeliveryDate),year(DeliveryDate) & num(month(DeliveryDate), '00')) as YearMonth2
,num(Month(DeliveryDate),'00') & ' / ' & (Year(DeliveryDate)+1) as GraphicYearMonth
from [$(DataFolderName)/SALES.qvd] (qvd)
where
DeliveryDate >= Date(MonthStart(Today(), -17))
and DeliveryDate < Date(MonthStart(Today(), -5))
You can accomplish COMPARISONS between time periods using SET ANALYSIS. If you are not familiar with set analysis, I created a post years ago that is a hands on workshop. You can download a PDF of the exercises that leads you through it and an application that has the data for the exercises.
You can concatenate both tables.
Using GraphicYearMonth as dimension and applying set analysis to make two metrics, you can do it using the field origen (Sum({$<Origen = {'SALES'}> }JobOrderQuantity_KG)).
Regards
SALES:
LOAD 'SALES' as Origen,
"ProfitCenter"
,"ItemCategoryCode"
,"JobOrderQuantity_KG"
,Dual(num(Month(DeliveryDate)) & ' / ' & Year(DeliveryDate),year(DeliveryDate) & num(month(DeliveryDate), '00')) as YearMonth
,num(Month(DeliveryDate),'00') & ' / ' & Year(DeliveryDate) as GraphicYearMonth
from [$(DataFolderName)/SALES.qvd] (qvd)
where
DeliveryDate >= Date(MonthStart(Today(), -5))
;
Concatenate
LOAD 'LAST_YEAR' as Origen,
"ProfitCenter"
,"ItemCategoryCode"
,"JobOrderQuantity_KG"
,Dual(num(Month(DeliveryDate)) & ' / ' & Year(DeliveryDate),year(DeliveryDate) & num(month(DeliveryDate), '00')) as YearMonth2
,num(Month(DeliveryDate),'00') & ' / ' & (Year(DeliveryDate)+1) as GraphicYearMonth
from [$(DataFolderName)/SALES.qvd] (qvd)
where
DeliveryDate >= Date(MonthStart(Today(), -17))
and DeliveryDate < Date(MonthStart(Today(), -5))