Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a qvd with following fields
YearMonth,
Calendar_Year,
Plant,
BUEqui,
Strategic_Flag,
Country,
Contract_Type,
Part_Type,
Fiscal_Month,
ITM_IB,
ITM_Consumption
and to get YTD logic i have given the below condition:
FinalTable:
LOAD*,
If(BUEqui = Previous(BUEqui) and Plant = Previous(Plant) and Calendar_Year = Previous(Calendar_Year) , RangeSum(ITM_Consumption, Peek('YTD_Consumption')), ITM_Consumption) as YTD_Consumption
Resident QV_intermediate_temp5
order by BUEqui,Plant,YearMonth ;
DROP Table QV_intermediate_temp5;
Below image for reference:
If you see my YTD_cons for Jan is fine but for feb instead of 1934+6913 =8847 i am getting 176974.
Can you please help where i am doing wrong.
Attached app for reference.
Thanks,
Bharat
Check now
There are multiple rows with same dimension values... may be you want to Sum them before you calculate YTD_Consumption?
Yes Sunny Bhai.. Is there anything wrong in the data..
wrong with data... I don't know... wrong with way script is running... may be (because you are not getting the right output)
Yes, Can you please help how can i get it..
can you share your qvd?
Please find the attached qvd
In case if you got T9 qvd please don't use .. kindly use T10 qvd i have shared..
Please let me know if you need anything more..
Check attached
Thank You Sunny.
But if i select 4 months the value is getting wrong. Please find the attached app.
Below image for reference;
Instead of 12350 i am getting 14822 and if i change any BUEQUI also the values are not getting same.
Can you please have a look..