Dashboards & Visualizations

Dynamic Dropdown Uniqueness Issue- Is it possible to retain all the values of x?

BrentHetherwick
Explorer

I have a dropdown in a dashboard that uses a lookup table with columns X and Y.  The values in X are unique; the values in Y are not.  I am using X in "Field for Label" and Y in "Field for Value".

The problem is that when I do not dedup Y, I get an error below the dropdown that says,

Duplicate values causing conflict.

The search string I'm using is this:

| inputlookup LT | fields X, Y

When I change it to this:

| inputlookup LT | fields X, Y  | dedup Y sortby X

...the error disappears.

What I would like is to retain all the values of X instead of removing some with the dedup operation.  Is this possible?

Labels (1)
0 Karma
1 Solution

VatsalJagani
SplunkTrust
SplunkTrust

@BrentHetherwick - Here for the dropdown:

  • Field for Label - is like the title
  • Field for Value - is like the ID

Hence ID has to be unique. Now Field for Label and Field for Value both could be the same field does not necessarily have different fields.

Now if you want X as value and title both, and as you mentioned X is unique.

For Y you cannot do that same because Y value is not unique.

 

Or you can try updating this query while keeping everything else in the current state to see if this works what you expect or not:

| inputlookup LT | fields X, Y | stats values(X) as X by Y | eval X=mvjoin(X, ", ")

 

I hope this helps!!! Karma/upvote would be appreciated!!!

View solution in original post

VatsalJagani
SplunkTrust
SplunkTrust

@BrentHetherwick - Here for the dropdown:

  • Field for Label - is like the title
  • Field for Value - is like the ID

Hence ID has to be unique. Now Field for Label and Field for Value both could be the same field does not necessarily have different fields.

Now if you want X as value and title both, and as you mentioned X is unique.

For Y you cannot do that same because Y value is not unique.

 

Or you can try updating this query while keeping everything else in the current state to see if this works what you expect or not:

| inputlookup LT | fields X, Y | stats values(X) as X by Y | eval X=mvjoin(X, ", ")

 

I hope this helps!!! Karma/upvote would be appreciated!!!

BrentHetherwick
Explorer

Thank you.  This solution will work for me.

0 Karma
Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...