Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
montubhardwaj
Specialist
Specialist

What is wrong with this formula?

Hi All,

The below formula is working all fine when I am using it in the expression of a chart. But when I am trying to calculate it in the script, its throwing an error saying "invalid exoression". Can you please explain what is the error ?

If(SlsYear=2011 and SlsMonth<9,Sum(Sales),If(SlsYear=2010 and SlsMonth>=9,Sum(Sales))) as Roll_12_Sales

Cheers,

Sharma

10 Replies
montubhardwaj
Specialist
Specialist
Author

Thank You all for your response. I forgot to do group by. BUt let me know one thing: if I dont put Sum in the script, it runs fine. But will it be right to do so? Anywway, I am putting Sum(<field>) in the expression. Thanks for your response.