Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a Master Calendar with a MonthYear column
Left(Month(TempDate), 3) & '-' & Right(Year(TempDate), 2) as MonthYear
and a Budget data table with column names matching MonthYear column values along with product name and product type.
LOAD
"Product Name",
"Item Code",
"45108" as "Jul-23",
"45139" as "Aug-23",.....
I want to visualize sum of each MonthYear column values.
Use the cross table to convert your budget table Month data into a column and another column for the month year. below is a sample code. Then link this Month year column to the master calendar.
Test:
Load * Inline [
Product Name,Item Code,45108,45139
A,001,10,20
B,002,15,10
C,003,11,15
]
;
Test2:
Crosstable (MonthNum, Budget,2)
Load
*
Resident Test;
Final:
Load
"Product Name",
"Item Code",
MonthName(Num#(MonthNum)) as MonthYear,
Budget
Resident Test2;
Drop Tables Test,Test2;
Use the cross table to convert your budget table Month data into a column and another column for the month year. below is a sample code. Then link this Month year column to the master calendar.
Test:
Load * Inline [
Product Name,Item Code,45108,45139
A,001,10,20
B,002,15,10
C,003,11,15
]
;
Test2:
Crosstable (MonthNum, Budget,2)
Load
*
Resident Test;
Final:
Load
"Product Name",
"Item Code",
MonthName(Num#(MonthNum)) as MonthYear,
Budget
Resident Test2;
Drop Tables Test,Test2;