Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
generalfinance
Contributor III
Contributor III

Error in expression ')' expected.

Hello everybody,
I can't write the following formula correctly:

Interval ({<(sum (date ([Expiry Date and], 'DD / MM / YYYY') - date ([Practice Date and], 'DD / MM / YYYY')))) = {"> = $ (Start of Month ) <= $ (vDataRifA) "}>}) * Nominale_a /
Sum ({<[Practice Date and] = {"> = $ (Start of Month) <= $ (vDataRifA)"}>} Nominale_a)

Error in expression ')' expected.

You can help me?
Thanks

Labels (1)
1 Solution

Accepted Solutions
generalfinance
Contributor III
Contributor III
Author

Hi Anil,
yes [Start of month] is a variable for precision = date (MonthStart (vDataRifA), 'DD / MM / YYYY'), now I no longer have the error Error in expression ')' expected, but the correct calculation is this :

Sum (If (date ([Expiry Date and], 'DD / MM / YYYY') - date ([Practice Date and], 'DD / MM / YYYY')> = $ (Start of Month) and date ([Expiry Date and ], 'DD / MM / YYYY') - date ([Practice Date and], 'DD / MM / YYYY') <= $ (vDataRifA) * Nominale_a)) /  Sum ({<[Data Pratica and] ={ ">=$(VinizioMese)<=$(vDataRifA)"}>}Nominale_a)

Thank you very much for helping

View solution in original post

6 Replies
usamabinsadiq
Contributor III
Contributor III

Hi,

 

please try this, i hope this resolves your issue.

Interval ({<(sum (date ([Expiry Date and], 'DD / MM / YYYY') - date ([Practice Date and], 'DD / MM / YYYY'))) = {"$(= '>=' & date(Start of Month ) & '<=' & date(vDataRifA) )"}>})
*
Nominale_a
/
Sum ({<[Practice Date and] = {"$(= '>=' & date(Start of Month) & '<=' & date(vDataRifA) )"}>} Nominale_a)

regards 

if my replay helped you then please press like button and do not forget to press the "Accept as Solution" button.
generalfinance
Contributor III
Contributor III
Author

Hi usamabinsadiq,
thanks for the help but unfortunately i still have this error

"Error in expression ')' expected"

 

 

Anil_Babu_Samineni

[Start of month] is the variable? If so try this

Sum(If(date ([Expiry Date and], 'DD / MM / YYYY') - date ([Practice Date and], 'DD / MM / YYYY')>=$(Start of Month ) and date ([Expiry Date and], 'DD / MM / YYYY') - date ([Practice Date and], 'DD / MM / YYYY')<=$(vDataRifA), Nominale_a))/Sum ({<[Practice Date and] = {"> = $ (Start of Month) <= $ (vDataRifA)"}>} Nominale_a)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
generalfinance
Contributor III
Contributor III
Author

Hi Anil,
yes [Start of month] is a variable for precision = date (MonthStart (vDataRifA), 'DD / MM / YYYY'), now I no longer have the error Error in expression ')' expected, but the correct calculation is this :

Sum (If (date ([Expiry Date and], 'DD / MM / YYYY') - date ([Practice Date and], 'DD / MM / YYYY')> = $ (Start of Month) and date ([Expiry Date and ], 'DD / MM / YYYY') - date ([Practice Date and], 'DD / MM / YYYY') <= $ (vDataRifA) * Nominale_a)) /  Sum ({<[Data Pratica and] ={ ">=$(VinizioMese)<=$(vDataRifA)"}>}Nominale_a)

Thank you very much for helping

generalfinance
Contributor III
Contributor III
Author

how do I manage if with multiplication?

generalfinance
Contributor III
Contributor III
Author

how can I say that the sum of the difference between the two dates must be between the two variables?

 

sum(date([Data Scadenza and],'DD/MM/YYYY') - date([Data Pratica and],'DD/MM/YYYY')) = { ">=$(VinizioMese)<=$(vDataRifA)"}