Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
tas_taba1
Contributor III
Contributor III

Including dimensions in calculations/expressions regardless of user selections

***Updated Version- https://community.qlik.com/t5/Qlik-Sense-App-Development/Include-all-the-dimension-values-regardless...

I am facing some difficulties with one of my projects. I have a dataset with some stratum and each strata consists of some clusters and the cluster numbers are unique to each strata. Now, if I want to create a table in Qlik sense app where I use another field (in my case- race) as a dimension, some strata/cluster gets filtered away since that specific race does not include that stratum/cluster. 

However, I need to have all the stratums/clusters, regardless of user selections/filters, included in part of the expression - because I need to perform some calculations on the missing stratums/cluster bases as well. The calculation requires that if the strata/clusters are not in the sample selected by user (via filters), their values need to set be set "0" - therefore, be included in the measure calculations.

This is the desired output-

desired_resultdesired_result

So, for my std calculation, I want to consider all the clusters and strata for a specific race.

Any help is greatly appreciated.

***Update- Please refer to this updated and corrected version of this post if you are here- https://community.qlik.com/t5/Qlik-Sense-App-Development/Include-all-the-dimension-values-regardless...

Thank you!

2 Replies
chrismarlow
Specialist II
Specialist II

Hi,

I think you will need to use an AGGR similar to solution here; 

https://community.qlik.com/t5/New-to-QlikView/Why-does-my-Avg-expression-not-work-I-mean-how-do-I-ge...

I don't know if this would make the rows appear as you would like, but it should be able to include the right set of data (i.e. including things that are 0) in your calculations.

If you can't get anywhere share some dummy data in Excel (be careful how many rows 😂) and expected result (bit hard trying to copy out from a JPEG...).

Cheers,

Chris.

tas_taba1
Contributor III
Contributor III
Author

Hi @chrismarlow , thanks for your input. Here's the dummy app for your reference.