Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need Clarification on Monthly Average Spent

Hello Frineds

I would like to find the Monthly Average spent for last year and Current Year, I have written the expression as in the below but its showing wrorng resutls.

Could you please any one suggest me, where I am making a mistake in the expression.

=Num(Avg({$<ShipmentMonth,ShipmentYear={$(=max(ShipmentYear)-1)}>} [Rupees]),'# ##0')

=Num(Avg({$<ShipmentMonth,ShipmentYear={$(=max(ShipmentYear))}>} [Rupees]),'# ##0')

Regards

Ammu

2 Replies
sujeetsingh
Master III
Master III

Hi,,

one thing i found is theat use year(today()) for current Date...

Vegar
MVP
MVP

I don't see any direct wrongs with your expressions, except the last format definition that have a incorrect space ('# ##0') to render correctly (maybe it is my browser/forum that makes that conversion)

Be aware that your max(shipmentYear) will change whenever you make any selections in your data.