Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am having trouble sorting some data onto a straight table chart. Certain values aren’t being displayed in the appropriate field, although the value exists in the source data. To make the matter more confusing, this is only happening with certain data points, while others are displaying properly. I can find no difference between the two data sets which would cause this.
I hope I am able to clearly explain my issue, as our security policy prevents uploading any content to share.
I’ll start at the beginning, because my problem could be caused by an error in the way I load the data. The source material has two relevant columns, “Resource” and “Selection”. The possible values in “Selection” are based on the value in “Resource”. My function deals with only one specific resource (“Incident”), so my first step is to separate the data associated with that resource from the rest.
Within the Incident resource, the values are grouped into three categories (Severity, Technology, Source), each having three possible values.
Severity- Minimal, Moderate, Severe Technology- A, B, C Source- 1, 2, 3
To make it more complicated, the category groupings aren’t listed at all, so I have to work backwards to create those groups. My source data might look like:
ID | Resource | Selection |
12345 | Incident | Minimal |
12345 | Incident | 2 |
12345 | Incident | B |
12345 | (unrelated resource) | (unrelated data) |
11111 | Incident | Moderate |
11111 | Incident | A |
The first thing I do is separate the Incident data from the rest. In my primary LOAD statement, I have:
IF(MATCH([Resource], ‘Incident’),’Incident2’) as [Incident3],
This creates a tag to separate Incident data from the unrelated resources, which I can use in functions later.
Next, I use preceding loads to separate the Selection data into the three relevant categories.
LOAD *, IF(MATCH([Selection], ‘Minimal’, ‘Moderate’, ‘Severe’), [Selection] as [Severity];
This is repeated for the Technology and Source groupings.
Next, I want to create a table which shows only entries with a related incident, and display the Severity, Technology, and Source of each. I use a straight table chart showing the ID number of the entry as the dimension, and three expressions to display the needed values:
IF([Incident3]=’Incident2’,[Severity]) (if the data references an incident, display the Severity value)
IF([Incident3]=’Incident2’,[Source]) (if the data references an incident, display the Source value)
IF([Incident3]=’Incident2’,[Technology]) (if the data references an incident, display the Technology value)
This seems to work for the most part. The issue I am having is that some values in my expression columns are not displaying, while others are. I can find no difference between the ones displaying correctly and the ones missing values.
The resulting table might look like this:
ID | Severity | Source | Technology |
12345 | Minimal | 2 | A |
99999 | Moderate | - | B |
55555 | - | 1 | - |
00000 | Severe | 2 | - |
11111 | - | - | A |
Each entry should have a complete data set, as 12345 does. If I add a field to the page where I can select Source, I can choose 3 and it will bring up 99999 and the Source value will be 3 instead of NULL. If I don’t make a selection, the same entry displays NULL instead.
My question is, what could be preventing existing values from displaying on the straight table, when they exist in the source data? Why is QV reading a result as NULL , when it associates the correct value with the ID when a selection is made?
That did it!
And I see where that would cause a problem. I substituted 123 and ABC to simplify the discussion, but never indicated that it was all text. Thanks for the help.