Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a date variable associated to a calendar object. This variable should be used at the following set analysis expression (text object):
= money(sum({<[Data Receb/Pagto]= {$(#Data Base)}>} [Valor Original]))
It always returns 0 (zero), although having data to sum. The [Data Receb/Pagto] field, when used in a text object returns a "date". The "Data Base" variable, when used in a text object returns a "number". In this way, I thought that the set analysis expression should be changed, but it made no diference:
= money(sum({<[Data Receb/Pagto]= {$(=#date($(#Data Base)))}>} [Valor Original]))
or
= money(sum({<[Data Receb/Pagto]= {$(=#num($(#Data Base)))}>} [Valor Original]))
What is wrong?
regards,
Paulo Costa
I just read that your variable returns a number. Give this a try:
=Money(Sum({<[Data Receb/Pagto] = {"$(=Date($(DataBase), 'yourDateFormat'))"}>} [Valor Original]))
Replace yourDateFormat with whatever format you have for [Data Receb/Pagto]
#Date Base is the name of your variable?
Try this:
=Money(Sum({<[Data Receb/Pagto]= {"$(#Data Base)"}>} [Valor Original]))
"Data Base" is the name of my variable.
The expression that you posted made no difference.
My suggestion is to have no spaces between your variable name (Something like this would be ideal vDataBase)
Try this:
=Money(Sum({<[Data Receb/Pagto]= {"$(Data Base)"}>} [Valor Original])) or
=Money(Sum({<[Data Receb/Pagto]= {"$('Data Base')"}>} [Valor Original])) (never worked with variables which have a space between them, so not sure how can they be used and that's why I suggest using vDataBase)
If you do use vDataBase then you can try this:
=Money(Sum({<[Data Receb/Pagto]= {"$(vDataBase)"}>} [Valor Original]))
I´ve changed the variable name (elimitating blank - DataBase) and it remais the same. Zero as result.
I just read that your variable returns a number. Give this a try:
=Money(Sum({<[Data Receb/Pagto] = {"$(=Date($(DataBase), 'yourDateFormat'))"}>} [Valor Original]))
Replace yourDateFormat with whatever format you have for [Data Receb/Pagto]
It´s running fine now. THANKS!
='Total, com base na data base = ' & money(sum({<[Data Receb/Pagto]= {"$(=date($(DataBase),'DD/MM/YYYY'))"}>} [Valor Original]))