Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
I have below data set
//--Creating crosstable to get the Periode values in single column--//
CrossTable(PERIOD_AUX, FLAG, 30)
TableAux:
LOAD
"SOURCEID",
"ENTITY",
"BUKRS",
"BUTXT",
"LANDX",
"REGION",
"DIVISION",
"BLART",
"BELNR",
"AUGDT",
"AUGBL",
"KUNNR",
"BLDAT",
"CPUDT",
"LIFNR",
"NAME1",
"KTOKK",
"TXT30",
"NBOFDAYS",
"BUZEI",
"SGTXT",
"HKONT",
"TXT50",
"BUDAT",
"TOTAL",
"WAERS",
"TOTAL_L",
"HWAER",
"AMOUNT_EUR",
"CATEGORY",
"PERIOD_1",
"PERIOD_2",
"PERIOD_3",
"PERIOD_4",
"PERIOD_5",
"PERIOD_6",
"PERIOD_7",
"PERIOD_8",
"PERIOD_9",
"PERIOD_10",
"PERIOD_11",
"PERIOD_12",
"PERIOD_13"
FROM [...]
(qvd) ; //-attached the excel file for reference
====================================================================
The values for the periodes are dynamic at backend , eg if periode_1 is Jan2021, when we the March month comes, the
value for "PERIOD_1" will become Feb 2021
The value inside all the "Periode" fields is either 0 or 1. Hence i created a crosstable for the same.
Requirement :-
1) to calculate the sum(AMOUNT_EUR) when Flag is 1
2) to get the period values as dynamic
I tried below --//created a new table to get dynamic monthnames
NoConcatenate
Final_Data: //created new table
Load
"SOURCEID",
monthname(addmonths(today(), -num#(subfield(PERIOD_AUX, '_', 2)))) as PERIOD,
AMOUNT_EUR as AMOUNT
Resident TableAux
Where FLAG=1;
By using above table, i got the name of the month:-
=====================================
Expected output:-
My ouptput:-
When i create a new table, the values for Amount increases , the data gets increased.
I am not able to figure out why and how we can achieve this to get the right output. Please help
Thank You
Hello again,
Can anyone please help me with the above problem ??????/