Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Percentage of total row count ignoring other dimension filters

I have a simple bar chart that displays the total record count of some dimension members using the expression 'count (distinct expr )'

Lets say one of the bars measures 55,000.

If I filter using another dimension the count is now 22000.

I am trying to add an expression to the same bar chart that will show this as a percentage - 22000 / 55000.

'count (total expr )' also gives me 22000.

What expression will give me 55000 regardless of other dimension filters so that I can display the percentage?

Many Thanks

Sandy

1 Solution

Accepted Solutions
eric_dielessen
Partner - Contributor III
Partner - Contributor III

count({1} distinct expr) should do the trick.

View solution in original post

5 Replies
Not applicable
Author

Can you try the following...

count(total(expr))

eric_dielessen
Partner - Contributor III
Partner - Contributor III

count({1} distinct expr) should do the trick.

Not applicable
Author

count ( {1} distinct expr ) did the trick - thanks!

Not applicable
Author

Hi,

If you are using QV 8.5 then you should be able to solve this fairly easy with SET analysis.

Where Dim1 is the dimension you filtered on. You could add more Dimensions if you like. Seperated with comma.

count (distinct {$<[Dim1]={*},[Dim2]={*}>} Expr)



best regards,

Johan

Not applicable
Author

Thanks all for your answers.

The answer from eric was exactly what I was looking for.