Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

Lookup corresponding field value in UI

Hi all

I have a calendar table that contains each calendar date for a chosen period and it also includes lookup fields like Year, Month and a concatenation of Month and Year.

CalendarDateCalendarYearCalendarMonthMonthYearMonthYearSeq
01/02/20152015FebruaryFeb-20152
02/02/20152015FebruaryFeb-20152
01/03/20152015MarchMar-20153
01/04/20152015MarchApr-20154
01/02/20162016FebruaryFeb-201613

The MonthYearSeq starts at 1 for the earliest month in the calendar, and increments by 1 for each subsequent month.  I use this field in variables and set analysis to find the previous month (MonthYearSeq-1) and the same month in the previous year (MonthYearSeq-12) to the MonthYear that the user has selected.

I would like to use the 'previous month' and 'same month in the previous year' in table headings by specifying the corresponding MonthYear to the MonthYearSeq derived by the variables.

Is there a lookup function or similar that can be used in the UI?

Thanks in advance.

1 Solution

Accepted Solutions
MVP
MVP

Re: Lookup corresponding field value in UI

if I understand your question

I used for field heading (or if you want table heading)

=Only({$ <MonthYear=,MonthYearSeq={"$(=max(MonthYearSeq)-1)"}>} MonthYear)

1.jpg

3 Replies
Employee
Employee

Re: Lookup corresponding field value in UI

you can use the Only() function with Set Analysis to return a single value

Only(  {$<MonthYearSeq=<correctsyntax>}   MonthYear)

...where 'correctsyntax' will be an expression that evaluates to just one MonthYearSeq value for the whole table.

MVP
MVP

Re: Lookup corresponding field value in UI

if I understand your question

I used for field heading (or if you want table heading)

=Only({$ <MonthYear=,MonthYearSeq={"$(=max(MonthYearSeq)-1)"}>} MonthYear)

1.jpg

Not applicable

Re: Lookup corresponding field value in UI

Thank you both, very useful.

Community Browser