Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys
I have table like this. I want to make line chart based on category and SCNR_ID will be the filter. I have load data using script.
scenario_waterfall:
LOAD
SCNR_ID,
CATEGORY,
COST,
FROM [lib://DataFiles/scenario_waterfall.csv]
(txt, codepage is 28591, embedded labels, delimiter is ',', msq);
Sum_of_cost:
Load CATEGORY, Sum(COST) as Node_cost Resident scenario_waterfall Group By CATEGORY;
SCNR_ID | CATEGORY | COST |
BSLINE | CDC-DESTINATION | 35455202.76 |
BSLINE | RDC-CDC | 2452100.513 |
OPT | CDC-DESTINATION | 5096324.264 |
OPT | RDC-CDC | 2866304.793 |
But its giving me total cost instead of category wise cost. why it's happening I want to do this by using script only.
Can you share Excel source file that you are using
maybe this:
Sum_of_cost:
Load SCNR_ID, CATEGORY, Sum(COST) as Node_cost Resident scenario_waterfall Group By SCNR_ID, CATEGORY;
I hope it can helps.
I think once you are done with Aggregation, drop the Fact Table.
scenario_waterfall:
LOAD * INLINE [
SCNR_ID, CATEGORY, COST
BSLINE, CDC-DESTINATION, 35455202.76
BSLINE, RDC-CDC, 2452100.513
OPT, CDC-DESTINATION, 5096324.264
OPT, RDC-CDC, 2866304.793
];
Sum_of_cost:
Load CATEGORY, Sum(COST) as Node_cost Resident scenario_waterfall Group By CATEGORY;
Drop Table scenario_waterfall;