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

Announcements
Save an extra $150 Dec 1–7 with code CYBERWEEK - stackable with early bird savings: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Any Ideas on How to Automate Label for Expression?

Hi

I have two tables in my query, one for sales transactions containing yymm and salesvalue

I have another table with yymm,month ref and Mmm yy

Because my client is not nt happy with users having pivot tables they currently manual adjust a column in each table every month (Jun 12 is rebuilt as Jun 13)

My expression is sum(if(Month ref = 'x',salesvalue))

What I would have used for my label in other applications would be if(month ref = 'x','Mmm yy'), unfortunately this seems to miserably fail, as does any other formula that I enter in the Label

Any ideas are very much welcomed.

Thanks

1 Reply
rustyfishbones
Master II
Master II

try this

MONTH(MAX(Date) for this month label

MONTH(ADDMONTHS(MAX(Date),-1)) for last month

MONTH(ADDMONTHS(MAX(Date),-2)) for previous month