Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
alexrusin
Contributor
Contributor

Filter hypercube by several fields(dimensions)

Hi All

Could you please advice, how I can filter hypercube object by several fields?

For example I created HyperCube(by Engine API Explorer) with dimensions City and Year. And from qMatrix array I need get only Meansures where for example City = York and Year = 2000.

Is present some way to filter HyperCube by several dimensions?

Thanks! 

Labels (3)
1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

In your Measure def, use a set expression to limit by your criteria. For example:

=sum({<City={'York'}, Year={2000}>} Sales)

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

View solution in original post

4 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

In your Measure def, use a set expression to limit by your criteria. For example:

=sum({<City={'York'}, Year={2000}>} Sales)

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

alexrusin
Contributor
Contributor
Author

Thanks, solution work as well!
Gappodi
Contributor
Contributor

Rob,
Is there a way to set these selections through some structures (like Generic Object with qListObjectDef or Field Class with Select Method)?
Thanks
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You could make the selections using one of the select methods and then the hypercube would reflect those selections.  I'm not aware of a structure you could include in the hypercube def, but I would not be surprised if there is a way.  I'm always learning something new about the Engine API.

-Rob