Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Partner
Partner

Ignoring dimensions in part of Bar Chart expression.

Given the following table

SubjectInjurySeverity
BobKnee2
BobLeg3
JaneFoot1
JaneHand2
ZachKnee3
ZachHand2

 

I want to make a stacked bar chart with Injury as one dimension and Severity as the other.

I want a measure that (for each Injury and Severity) counts the number of people who had that injury and severity, and then divide that number by the total number of subjects (regardless of Injury/Severity) in order to derive the frequency of each injury/severity. 

I know the numerator of the expression is a simple count(distinct Subject), but I don't know how to get the denominator to work. 

Any help would be appreciated. 

Thanks,

Steve

Labels (3)
1 Solution

Accepted Solutions
Partner
Partner

Re: Ignoring dimensions in part of Bar Chart expression.

You will need to use TOTAL in your calculation. So your denominator could look like this:
=count( distinct total [Subject])

Plees ekskuse my Swenglish and or Norweglish spelling misstakes
4 Replies
Partner
Partner

Re: Ignoring dimensions in part of Bar Chart expression.

You will need to use TOTAL in your calculation. So your denominator could look like this:
=count( distinct total [Subject])

Plees ekskuse my Swenglish and or Norweglish spelling misstakes
Highlighted
MVP & Luminary
MVP & Luminary

Re: Ignoring dimensions in part of Bar Chart expression.

count(distinct total Subject)
Griffin20
New Contributor

Re: Ignoring dimensions in part of Bar Chart expression.

But ignoring dimensions would be not of much use..Infact it can spoil entire design for the project  mykfcexperience

Partner
Partner

Re: Ignoring dimensions in part of Bar Chart expression.

You might want to adjust your expression  count(distinct Subject)/count(distinct total Subject) based on which dimensions you want to present the quote value.

For overriding a dimension in your total you put it inside <> right after the TOTAL, like this:

count(distinct Subject)/count(distinct total <Injury> Subject)

 

Read more on the TOTAL feature here: https://help.qlik.com/en-US/sense/April2019/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/define-a...

Plees ekskuse my Swenglish and or Norweglish spelling misstakes