
Set Analisis problem
John Witherspoon Oct 5, 2009 8:56 PM (in response to Sergio Martin Alvarez)I may just be confused on what you are saying, but I would caution against managing your accounting in QlikView. QlikView is subject to minor mathematical errors, and your accounts might not balance correctly. I would only use QlikView for account reporting when the numbers don't have to be exact. Follow this link for more information in the errors and one way to work around them if necessary:
http://community.qlik.com/wikis/qlikviewwiki/explanationofmathematicalerrorsinqlikview.aspx
On to your actual question. Is AsiPeriodo a QlikView date with format 'YYYYM'? If so, I would probably handle it like this (untested):
sum({<AsiPeriodo={">=$(=date(yearstart(max(AsiPeriodo)),'YYYYM')) <=$(=date(max(AsiPeriodo),'YYYYM'))"}>} Asi1Importe*Asi1DoH)

Set Analisis problem
Sergio Martin Alvarez Oct 6, 2009 4:36 PM (in response to John Witherspoon )
John Witherspoon wrote:
I may just be confused on what you are saying, but I would caution against managing your accounting in QlikView. QlikView is subject to minor mathematical errors, and your accounts might not balance correctly. I would only use QlikView for account reporting when the numbers don't have to be exact. Follow this link for more information in the errors and one way to work around them if necessary:
http://community.qlik.com/wikis/qlikviewwiki/explanationofmathematicalerrorsinqlikview.aspx
On to your actual question. Is AsiPeriodo a QlikView date with format 'YYYYM'? If so, I would probably handle it like this (untested):
sum({<AsiPeriodo={">=$(=date(yearstart(max(AsiPeriodo)),'YYYYM')) <=$(=date(max(AsiPeriodo),'YYYYM'))"}>} Asi1Importe*Asi1DoH)<div></div>
Hi John, thank you for answer. Your formula was very close, it was not the correct but it gave me a lot of ideas, i changed a few things, the correct one for my application was:
sum({1<AsiPeriodo={"<=$(=date(=only(AsiPeriodo)),'YYYYMM')}>} Asi1Importe*Asi1DoH)
However, you were rigth, i didn't know about the mathematical errors, so, when i finished the balance sheet i had differences between 0.01 and 0.05 cents, i will have to change the source table to avoid the formula in qlikview.
Regards.


Set Analisis problem
sebagiar Oct 5, 2009 8:56 PM (in response to Sergio Martin Alvarez)Try this: sum({<AsiPeriodo=$(AsiPeriodo)>} Asi1Importe*Asi1DoH)