Skip to main content
Announcements
Qlik Acquires Upsolver to Advance Iceberg Solutions: READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
alexdelagarza
Contributor III
Contributor III

Problem with selections

Hello everyone,
I have a group of scenarios that correspond to different sections of a highway as can be seen in the following table:

alexdelagarza_1-1725981194433.png

I have an expression that should return the records that are at the intersection of scenarios 204 and 208, but it returns records from other scenarios as well, such as 104, 107, 108, etc., as can be seen in the following table:

alexdelagarza_3-1725981372989.png

This is the expression:

=count( {$<ID_CARD= P({<Escenario2={'208'}>})*P({<Escenario2={'204'}>})>} ID_CARD )

If I use the filters and select only the scenarios I want, I get the result I expect:

alexdelagarza_4-1725981514526.png

But, I need you to give it to me without using the filters.


I hope you can help me.
Thank you very much

Labels (1)
1 Solution

Accepted Solutions
rubenmarin

Hi, that expression filters only the ID_CARd field, so if a value of that field is on another scenarios they will show.

You can add the fitler for the wanted scenarios on the same set analysis:

=count( {$<ID_CARD= P({<Escenario2={'208'}>})*P({<Escenario2={'204'}>}),Escenario2={'208','204'}>} ID_CARD )

View solution in original post

3 Replies
rubenmarin

Hi, that expression filters only the ID_CARd field, so if a value of that field is on another scenarios they will show.

You can add the fitler for the wanted scenarios on the same set analysis:

=count( {$<ID_CARD= P({<Escenario2={'208'}>})*P({<Escenario2={'204'}>}),Escenario2={'208','204'}>} ID_CARD )

Vegar
MVP
MVP

Consider if P(...) is the right syntax for your need. Maybe you should skip using them and replace them with a more direct modifier.

=count( {$<Escenario2={'208','204'}>} ID_CARD )

alexdelagarza
Contributor III
Contributor III
Author

Thanks it worked, sorry for the late answer.