Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good day, everyone!
I have some throuble with expr. I need to get sum(Sales) over my filter.
On first page i got total sum, it work correct:
Sum({<t35PRDWAER = {'RUB'}>} DECNRPRDEC),
where t35PRDWAER field is currency, DECNRPRDEC is sales
On second page i want to get this, but it doesn't work:
Sum({<t35PRDWAER = {'RUB'}, BVRPBEDVTZ <= (VTRBEGDVTR + year - (365/BVRZAHWVTR))>} DECNRPRDEC),
where BVRPBEDVTZ is date of sale, VTRBEGDVTR is another date field, BVRZAHWVTR is something else.
Please, help me write expression correct.
UPD1: MY FALSE, FRIENDS, i forget to tell that i got 'YYYYMMDD' format in date fields!
UPD2: HERE IS EXAMPLE.QVF, take a look, friends!
Check the date format of field "BVRPBEDVTZ' and the value which you get from "=(date(VTRBEGDVTR) + year - (365/BVRZAHWVTR))". The format has to be same.
It would be great if you can share qvw with sample data.
Friends! I convert all dates in main script!
When load data:
CAST(vtr1.VTRBEGDVTR as date) as VTRBEGDVTR,
CAST(vtr1.BVRPBEDVTZ as date) as BVRPBEDVTZ
Fields BVRPBEDVTZ & VTRBEGDVTR will be in date format, but need to confirm if "=(date(VTRBEGDVTR) + year - (365/BVRZAHWVTR))" returns value in same date format.
what is year in the below?
VTRBEGDVTR + year - (365/BVRZAHWVTR)
that right question, i thought already that this is function!
i need to minus 1 year from VTRBEGDVTR but how to write correct?
i wrote incorrect, sorry, friend
use
Date(AddYears(VTRBEGDVTR,-1))
or
AddYears(VTRBEGDVTR,-1)
i replace this
added sample data in post!
added example in post, please, take a look!
add an example in post! please, take a look!