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: 
Anonymous
Not applicable

Custom Chart From Filtered Data

I am planning to develop an extension to customize chart to cater my needs. I created an app and added filters to the sheet. Now based on the filtered conditions, I want to redraw the chart.

So far I was able to get the entire data for the sheet from layout.qHyperCube.qDataPages[0].qMatrix

Instead of "entire" data for the sheet, I need filtered once. Is it possible in straight forward ways?

Otherwise, I am planning to use model.layout.qSelectionObject.qSelections and filter manually.

Please suggest. Let me know if you need more context.

1 Solution

Accepted Solutions
Alexander_Thor
Employee
Employee

Now we are getting somewhere, in your qIntitialDataFetch object you have defined the first data page as being 2 columns wide and 50 rows. Change the qWidth to match the number of data columns and qHeight to match the number of rows you want to fetch. The maximum size of a data page is 10 000 cells so if you exceed that you will need to page the object for additional data.

Edit: As this is a intitial properties setting you will need to remove and re-add the object to the sheet for the settings to change.

View solution in original post

12 Replies
Alexander_Thor
Employee
Employee

Hey,

I would suggest you check out some of the introduction videos to how our associative technology works, this is the starting point for a multi-part series of short videos explaining it https://www.youtube.com/watch?v=gg-DRT3SwDM

But in short, beneath every app is a data model. Every selection in Qlik will filter the data model to figure out which data values are associated with your selection. Then ALL sheets and objects re-calculate to now show you what is available in terms of data after your data model is now filtered.

If you wish to manipulate the selected state that can usually be done through what we call Set Analysis in your expressions. For example, Sum({1<Year = {'2015'}>} Sales) would give you the sum of sales, ignoring the selection that in the app BUT with a implicit selection in the field Year with the value 2015.

Anonymous
Not applicable
Author

Sorry. That wasn't helpful at all.

I went through the example extensions. This wasn't covered there. I wouldn't post specific question if the generic an

Can you be specifically address the query? How to access the filtered set of rows from extension?

Alexander_Thor
Employee
Employee

Yes that is what I'm trying to do.
Your extension will calculate based on the available data. If you wish to provide the arbitrary filters for your aggregation then you could use Set Analysis as I pointed out above, here is a good intro Set analysis – an introduction ‒ Qlik Sense

What you have to understand is that you don't filter just the extension, Qlik maintains a global selection model/state so if you filter the extension then the app will also filter to match your selections. The way to break that model is through Set Analysis.

Edit: The best way would be for you to first emulate what you are trying to do in a native Table object in Qlik Sense. Extensions uses the same underlying data construct so if you can make it work as you want there then you can also make it work in a extension.

Anonymous
Not applicable
Author

I went through the video wasting more time. That is not what I asked. Please do spend sometime on understanding the request before pointing to another set of videos

I have been working on QlikSense for more than a year. The response so far has been good. But this time I am left with no solutions. At the end of this exercise if things go futile, I am going to report my management that it is not possible pointing to this thread and seek for alternate product.

If you are not understanding the use case I reported, I can summarize again.

1. I use QlikSense Server

2. I use QPS to integrate seamless with the web application that we have

3. I have an extension that can link to our web application and the link carries the filter selections. (model.layout.qSelectionObject.qSelections)

4. Now along with filter selections, I need access to the filtered data which I can use to plot under the web application (Not in Qlik Sense Hub)

Anonymous
Not applicable
Author

To add further, I need access to facts for the selected dimensions

Alexander_Thor
Employee
Employee

Then I won't waste your time.
But if you are interested in solving your issue I would suggest a better tone if you expect someone to help you out.

Anonymous
Not applicable
Author

Of course I am not using the desktop version but Qlik Sense Server which is paid. I expect prompt response rather than recommendations to watch video series.

We were one of the early adopters of Qlik, We need better guidance for seamless integration. From your response I lost hope that I will get resolution here.

I will escalate to Qlik sales and validate my requirements.

yblake
Partner - Creator II
Partner - Creator II

In Qlik Sense client, each user selection fires a paint event and layout.qHyperCube.qDataPages[0].qMatrix is filled with filtered data, all extensions use that straight forward mechanism...

If your selection doesn't come straight from a Sense object, but from an external part of your application, you may need to apply selections by code using selectValues

If you embed single charts, you can also specify somme seclections in the URL with Single Integration API

If hope it may helps...

Anonymous
Not applicable
Author

Thanks yblake. When I access layout.qHyperCube.qDataPages[0].qMatrix not all dimensions are returned. That's where I am stuck for past few days. Only the first two dimensions are returned.

I have attached the extension, app and data source here

My expectation is to get all dimensions (Say all countries, markets, states and regions for the selected values) which I can link externally to third party app.