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

Need to show a single value among multiple selected values

Hi Everyone,

I have a following requirement. I have Filter called Product which contains Values Like A,B & C and when the user selects all the values in Product then I have to show 1st Value of product in KPI

if the user selects all values A,B & C then in KPI value should show only A

if the user selects only B, C then KPI should show B

if the user doesn't select any value then it have show the 1st value i.e., A

We have achieved this by writing following expression

left(Concat (distinct Product, ' , '),FindOneOf(Concat(distinct Product, ' , ') ,' , ' , 1)-1)

Its working fine in KPI. when I have selected B, C  it will show only B. If i didn't select anything it will show only A.

Now the requirement is.. we want show this in the chart level

If the user selects A,B then Product A Sales only in line chart

if the user selects B,C the Product B sales only should show in line chart.

I have used the same formula which i mentioned above and assigned to variable. Used same variable as a Dimension in the chart but following chart is coming

 

SatyaPaleti_0-1632466491902.png

Here A value should only show. But it is summing both B& C values and showing as single value.

Below is the actual chart

SatyaPaleti_1-1632466593651.png

My Requirement is only to show A line. but it is clubbing B& C Values and showing as single value.

Can some one please help to resolve this Issue

Thanks,

Satya

 

 

 

 

Labels (1)
1 Solution

Accepted Solutions
tresesco
MVP
MVP

Have you tried with MinString()?

KPI : MinString(Product)

Chart Exp : Sum({<Product={'$(=MinString(Product))'}>}Sales)

View solution in original post

3 Replies
tresesco
MVP
MVP

Have you tried with MinString()?

KPI : MinString(Product)

Chart Exp : Sum({<Product={'$(=MinString(Product))'}>}Sales)

SatyaPaleti
Creator III
Creator III
Author

Awesome.. This what I am expecting Thanks Tresco

SatyaPaleti
Creator III
Creator III
Author

Hi @tresesco 

Now we have following Product Values.

1. Air Force Distribution

2. AIR Suppliers 01

3. AIR Suppliers 02

4. University of Madagascar.

So when we are using Minstring(Product) it have to show Air Force Distribution but now it's showing AIR Suppliers 01. We need to pop-up only Air Force Distribution as per alphabetical order but not the AIR Suppliers 01. How can we achieve this. could you please help me with this

Thanks,

Satya