PV8
PV8

Reputation: 6270

Exclude one dimension from total count / sum in qlik

I want to have the %-Share of a value in Qlik. I have two dimension and on KPI which I am using in a distribution graph: enter image description here

The data is:

Point   Brand   Business
A        AA      1
B        AA      1
C        AA      1

Right now i am using the formula: Count([Business])/Count(total [Business]), on my Y-Achse I have the Brand and my point is Point, Right now he is calculating the Super total, but How can I only calculate the total for the Brand? Something like Count([Business])/Count(total [Business], if Brand == Brand)

Upvotes: 0

Views: 1798

Answers (1)

Stefan Stoychev
Stefan Stoychev

Reputation: 5012

You should add Brand field as aggregation scope

count([Business]) / Count(total <Brand> [Business])

From Qlik's documentation

By using TOTAL [], where the TOTAL qualifier is followed by a list of one or more field names as a subset of the chart dimension variables, you create a subset of the total possible values.

Adding the field to the total can be translated as: count all Business but aggregated by Brand. And since Brand is also a dimension to the chart then for each row Count Total will be the count for the current Brand value

Upvotes: 1

Related Questions