Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Hrushikesh3781
Contributor
Contributor

Qlik mashup hypercube issues in fetching data such as same data getting returned, no option to exclude certain values like SQL NOT IN.

Hello, I am opening an existing qlik app using qlik.openApp(appId) then creating hypercubes to fetch data from qlik and use it in mashups

I have three challenges when trying to retrieve data using hypercube in a Qlik mashup:

1. I need to exclude a specific value while filtering data. I'm looking for an alternative to app.field.selectValues or selectMatch, something akin to the SQL NOT IN clause. For example, I want to get all records where the country is NOT IN "".

2. On my product comparison page, I need to fetch data for two products either sequentially or asynchronously. I have to apply multiple filters for the first product, create a hypercube to store that data, and then apply filters again for the second product, repeating the process. However, I've noticed that sometimes cube returns the same data for both products. This inconsistency is puzzling; about 50% of the time, it provides the correct, distinct data for the two products, but at other times, I receive identical data. I've experimented with various JavaScript methods to manage asynchronous behavior, such as promises and async/await, but the results remain unstable.

3. Occasionally, some values are returned incorrectly. At times I dont require any dimensions but just measures like SUM, Avg but here the values displayed in the Qlik app do not match what I get when querying in the mashup through hypercube. Refreshing or filtering again sometimes resolves the issue, but this behavior is also inconsistent, as the same code works at times.

For fetching data I am using app.createCube and to apply filters app.field().selectValues or selectMatch. I am a web developer and good with working with apis but not very famililar with qlik hypercube filtering. Any help would be greatly appreciated. Thanks!

 

Labels (5)
1 Reply
alex_colombo
Employee
Employee

Hey @Hrushikesh3781 , I'm replying following your points:

  1. For doing this you have to apply Set Analysis into your hypercube measures for apply an exlusion. Speak with your Qlik developers for getting help on this.
  2. If you are creating an hypercube or multiple hypercubes using the default selection state, all of them will be filtered for your current product values, and all of them will send you the same data. For applying different selections for the same product field, you could use a different selection state. This means that first hypercube will send you data for first product selection, second hypercube, which has another selection state, will send you data for second product selection.
  3. This should be troubleshooted, but if you are defining the correct hypercube definition, you should see same data from both hypercube and Qlik App.