New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Partner

Ignoring dimensions in part of Bar Chart expression.

Given the following table

 Subject Injury Severity Bob Knee 2 Bob Leg 3 Jane Foot 1 Jane Hand 2 Zach Knee 3 Zach Hand 2

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)

• Qlik Sense

1 Solution

Accepted Solutions
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

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

Re: Ignoring dimensions in part of Bar Chart expression.

count(distinct total Subject)
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

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