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

Display most recent record in text box

Greetings, I'm looking for help on how to do something in qlikview.

I have a table of data that has the following columns:

Most Recent record ind --- this equals 1 or 0 and indicates the latest record for a person

Record Date --- the time being reported for a record

Product Enrolled in --- the product the member was enrolled in as of the record date

Customer Name  --- customer name as of the record date

Customer Address --- customer address as of the record date

There are a bunch of other data fields in the table, but these are the only relevant ones this questions.

I want to create an app with two tabs.

Tab one lets users search for customers using a variety of the other columns in the table. Once they've selected the member, this tab shows a table box containing the history of products and addresses for the customer.

On tab 2, I'd like to show the information from the list box on the first tab, but only for the most recent record date, the row where "most recent record ind" is equal to 1. I'd like to show it in a text box so I can create a printable report for the person showing their contact info and a bunch of other information stored in the other fields in the table.

I could do this by creating a second table that has only the most recent record information for each member ID and join that to the first table so that tab1 shows all the records and tab 2 only the values from the "most recent table" but that would almost be doubling the size of the data stored and my base table is already quite large so I'd rather find a way to do it in qlik.

Thanks for any suggestions you can provide.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Why a text box? A Straight table sounds a lot simpler. Add all the fields you want to show to the straight table as dimensions. Add one expression sum({<IsLatestRecordIndicator={1}>} 1). Set the Total Mode of the expression to None. Then on the Presentation tab hide the expression column and enable the option Horizontal


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
Gysbert_Wassenaar

Why a text box? A Straight table sounds a lot simpler. Add all the fields you want to show to the straight table as dimensions. Add one expression sum({<IsLatestRecordIndicator={1}>} 1). Set the Total Mode of the expression to None. Then on the Presentation tab hide the expression column and enable the option Horizontal


talk is cheap, supply exceeds demand
bartsimpson77
Contributor III
Contributor III
Author

Thank you! That worked. As for why a text box ... I wasn't aware of the straight table.

One question on that object ... one of the fields I want to show is a date field. It doesn't look like there is a way to add formatting to the dimension columns to get it to display as a date.

If I add an expression =[date field] it shows up, and I can apply the date formatting, but then it adds a blank row between the column names and the most recent record data that is blank everywhere except that date column where it has a value. Is there any way to get rid of this extra row?

bartsimpson77
Contributor III
Contributor III
Author

Nevermind that question. I just had to turn off totals. Thanks again.

Gysbert_Wassenaar

Use a calculated dimension as dimension instead of the date field itself: =Date([date field],'D MMM YYYY')


talk is cheap, supply exceeds demand