Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
April 22, 2PM EST: Learn about GeoOperations in Qlik Sense SaaS READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
sruthi19
Contributor
Contributor

Filtering / displaying the Data based on the field value selection

Can any one pls help me out -

I have a Table -

ID       Scenario        Run

1            A                      1,2

2            B                      1,2,3

3             C                      1

4             D                      2,3

5             E                       1,3

I want to display / filter  the data  as :

Drop down field with Q1,Q2, Q3.

If Q1 is selected only Run with 1 should display.

If Q2 is selected Run with 1,2 should display

If Q3 is selected Run with 1,2,3 should display.....

6 Replies
Vegar
Partner
Partner

What about 2,3 and 1,3?

Is it possible for your data to contain the numbers in a non sorted manner like this 3,1,2 or 2,1? 

Plees ekskuse my Swenglish and or Norweglish spelling misstakes
Vegar
Partner
Partner

Try the solution below. I'm assuming you that 1,3 will be associated with q1 and q3. This solutions also handles different sortings such as '3,1,2' and '2,1'.

LOAD ID, Scenario, Run, Run as %quarter FROM Source;

For each _q in FieldValueList ('%quarter')

Quarters:

Load '$(_q)' as %quarter

'Q' & Subfield ('$(_q)' , ',') as Quarter

Autogenerate 1;

Next _q

Plees ekskuse my Swenglish and or Norweglish spelling misstakes
sruthi19
Contributor
Contributor
Author

I have a Table -

ID       Scenario        Run

1            A                      1,2

2            B                      1,2,3

3             C                      1

4             D                      2,3

5             E                       1,3

I want to display / filter  the data  as :

Drop down field with Q1,Q2, Q3.

If Q1 is selected only Run with 1 should display. - Where ever 1 under Run should Display

---> ID - 1,2,3,5 should display

If Q2 is selected Run with 1,2 should display -  under Run where ever 1 and 2 values should Display

----> ID - 1,2,4,5 should display

If Q3 is selected Run with 1,2,3 should display.....

---> ID - 1,2,3,4,5 should display

Is it possible for your data to contain the numbers in a non sorted manner like this 3,1,2 or 2,1? 

--> Yes

 

sruthi19
Contributor
Contributor
Author

When Q2 is selected it is not displaying the Run column value with only 1.

And also instead of Q1,Q2,Q3 - Q3-2020,Q4-2020,Q1-2021

Brett_Bleess
Support (Former)
Support (Former)

@Vegar Hey man, any chance you can swing back on this one and have another look at the new posts, sorry the notifications are still messing up too.  I am not sure you still have enough info, but I will let you be the judge.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
Vegar
Partner
Partner

I see, I must have missunderstood your requirements. You could try to run  this script instead.

LOAD ID, Scenario, Run, Run as %quarter Inline [
ID;Scenario;Run
1;A;1,2
2;B;1,2,3
3;C;1
4;D;2,3
5;E;1,3
] (delimiter is ';');

For each _q in FieldValueList ('%quarter')
	Quarters:
	Load '$(_q)' as %quarter,
	'Q' & IterNo()  as Quarter	
	Autogenerate 1
	WHILE IterNo() <= rangemax($(_q));
Next _q

 

I hope it will be of help.

Plees ekskuse my Swenglish and or Norweglish spelling misstakes