Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
MK9885
Master II
Master II

easy question probably about custom label for month selection

Hi,

I have a requirement where I have a table which shows me 12 months of data if I select any month

So if I select Mar-2018 table shows me

Jan, Feb+Jan, Mar+Feb+Jan, Apr+Mar+Feb+Jan and so on... for 12 months and dimension here is YearMonth.

This data is based on actuals and budget

So if I select Mar

The data for months less than or equal to Mar should have label as Actual 

and Date from Apr to Dec should have label as Budget

I tried quite a few expressions but doesn't seem to get it.

This label is dynamic... I can select any month here but selected and previous months are always Actuals in label, months falling after current selection are labeled as budget.

any help is appreciated.

@sunny_talwar

Labels (1)
22 Replies
MK9885
Master II
Master II
Author

Just a question,
if I select more than 1 month I.E
Jan,Feb Mar
then can we show Jan, Feb & Mar as Actuals & rest as Budget?
sunny_talwar

Try this out

=Aggr(Only({1} YearMonth) & Chr(13) & If(GetSelectedCount(Month) = 1, If(Only({1} [Year Month Num]) <= Max(TOTAL [Year Month Num]), 'Actual', 'Budget'), If(Only({1} [Year Month Num]) = [Year Month Num], 'Actual', 'Budget')), YearMonth)
MK9885
Master II
Master II
Author

Thanks again!