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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
sspawar88
Creator II
Creator II

Max Month order amount

Hi community,

Why following Expression is not showing result..is it any mistake in it?

sum({$<Month1={$(=max(Month1))}>}[Order Amount])

1 Solution

Accepted Solutions
kavita25
Partner - Specialist
Partner - Specialist

Try this


=SUM({< Month1=, Month1={'$(=Maxstring(Month1))'}>}[Order Amount])

Regards,

Kavita

View solution in original post

12 Replies
crusader_
Partner - Specialist
Partner - Specialist

Hi,

Check format of Month1.

Use simple listbox or textbox. In set analysis they must be the same.

I believe that Month1 is a text in your case.

Regards,

Andrei

sspawar88
Creator II
Creator II
Author

Month1 is field for Months.

crusader_
Partner - Specialist
Partner - Specialist

Obviously, yes

Show me, please, the script code how do you create this field.

Regards,

Andrei

sspawar88
Creator II
Creator II
Author

Year("Reported Date") as Year,

     Month("Reported Date") as Month1,

kavita25
Partner - Specialist
Partner - Specialist

Try this


=SUM({< Month1=, Month1={'$(=Maxstring(Month1))'}>}[Order Amount])

Regards,

Kavita

sspawar88
Creator II
Creator II
Author

Miracle Miracle

what is Maxstring....


Fantastic

crusader_
Partner - Specialist
Partner - Specialist

Please add

, num(Month(Date)) as numMonth

in your script and use it for Set Analysis.

Regards,

Andrei

kavita25
Partner - Specialist
Partner - Specialist

Maxstring is used for String...

max is used for numeric values..

sspawar88
Creator II
Creator II
Author

My answer is in 14.2588887 can you show me how to use num() to restict it on 14.25