Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, i need to create a graph (a dimention with date and an expression with a sum of values) that shows the amount of values related to a particular year, i have used this formula that doesn't work:
Sum({<Mid(DATA_PRES,7,4) = {"=$(=ANNO_PRES)"}> }IMPORTO_CERTIFICATI)
In this case the use of Mid is necessary to extract the year part from the date filed, and compare it with the ANNO_PRES field.
The date is a string with this format: dd-mm-yyyy.
Can you explain why the graph is not showed?
Thanks
Marco
Better to create the value as a field in the load script, and then use that field:
LOAD
...
Mid(DATA_PRES, 7, 4) As ANNO,
...
If ANNO_PRES is a field that contains a single value, or if it is a variable, then use:
Sum({<ANNO = {'$(=ANNO_PRES)'}> } IMPORTO_CERTIFICATI)
if ANNO_PRES is a field and the compare with ANNO_PRES is a line by line comparison:
Sum(If(ANNO = ANNO_PRES, IMPORTO_CERTIFICATI))
HTH
Jonathan
Hi
You cannot use function there
Sum({<Mid(DATA_PRES,7,4) = {"=$(=ANNO_PRES)"}> }IMPORTO_CERTIFICATI)
You can try something like this:
Sum({<DATA_PRES = {"=Mid(DATA_PRES, 7,4) = ANNO_PRES"}> } IMPORTO_CERTIFICATI)
HTH
Best,
Sunny
Better to create the value as a field in the load script, and then use that field:
LOAD
...
Mid(DATA_PRES, 7, 4) As ANNO,
...
If ANNO_PRES is a field that contains a single value, or if it is a variable, then use:
Sum({<ANNO = {'$(=ANNO_PRES)'}> } IMPORTO_CERTIFICATI)
if ANNO_PRES is a field and the compare with ANNO_PRES is a line by line comparison:
Sum(If(ANNO = ANNO_PRES, IMPORTO_CERTIFICATI))
HTH
Jonathan
I agree, I always try to move the heavy lifting part in the back end of the application as much as possible.
I have added a field to the table to let it compute within a table. In this manner is enaught to use the sum to have the computation.
Thanks
Marco