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

Creating Table report - bringing in field from another data table

Hi all,

 

Complete beginner with QlikSense, inherited a complex app from someone and trying to make some additions. So apologies for any incorrect terms and general stupidity.

I have multiple data tables in my data model. Currently in my analysis I have a table set up bringing through multiple data fields from one table, lets call this 2.1

There is a field I don't have in 2.1 that is in another data table, called 2.2. This contains dates,

They share a common link in a field called ID

I've written a statements in my analysis as:

=If([ID2.1]=[ID2.2],[Date2.2],)

This brings through the correct date, but also creates a new line for each ID in my data with a blank in Date.

If I suppress blanks, this removes some of the data as there are a few IDs that do not have a date in 2.2, but I need to show these. So how do I bring this date across, without creating more blanks but keeping the ones that are intentionally blank?

As I say, I am a total beginner and I'm sure what I'm trying to do is WAY to simplistic. Any help would be really appreciated.

1 Reply
Marcos_Ferreira_dos_Santos

Hi PaulSmith81

Have you solved the problem by yourself ?

If you don't, I suggest trying this:  If(IsNull([Date2.2]), "default value",[Date2.2])

Notes:

    1) in Qlikview the relationships between tables are automatic and we don't need a piece of code like "If([ID2.1]=[ID2.2]"

   2) the treatment of Nulls and Blanks is for sure a delicate subject in Qlikview. I really recommend you to read this in order to become confortable: https://community.qlik.com/t5/QlikView-Documents/NULL-handling-in-QlikView/ta-p/1484472

 Good luck!