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

Filtering Measure by a Calculated Dimension

I have created this calculated dimension.

Aggr(count(distinct Supplier),Product)

The result of the above is the number of suppliers that offer one product. For example, Product 1 is offered by 5 suppliers.

I need now to calculate the following.

% of total products offered by supplier that are only offered by only 1 supplier.

The expected result is a bar chart where...

Supplier 1      50% of the products Supplier 1 offers are only offered by Supplier 1.

Supplier 2     40% of the products Supplier 2 offers are only offered by Supplier 2.

I have tried the following in a bar chart

Dimension

Supplier

Measure

=if(Aggr(count(distinct Supplier),Product)=1,

Count( distinct Product)/ count ( TOTAL<Supplier> distinct Product))

 

And the result of that is 

error qlik.jpg

Labels (3)
1 Solution

Accepted Solutions
sunny_talwar

How about this

Count(DISTINCT {<Product = {"=Count(DISTINCT Supplier) = 1"}>} Product)/
Count(DISTINCT Product)

View solution in original post

2 Replies
sunny_talwar

How about this

Count(DISTINCT {<Product = {"=Count(DISTINCT Supplier) = 1"}>} Product)/
Count(DISTINCT Product)
luisccmm
Creator
Creator
Author

Thanks Sunny, as fast as always!!