Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

text box script - show a %

Hi,

Came across really cool expression that shows a headline figure in the form of a text box:

='£' & Num(Round(sum([Tenant_Arrears])), '#,##0') 

however, when trying to show another figure, this time a % were struggling. The script is below to try and get this % figure and works in princple in a straight table but we want this text box to just to show 'decent' properties as a % of all properties.

Current script : Num(Count ([Decency]= 'Decent')/ Count(TOTAL [Decency]), '#.##%')

Decency is the field with the 3 options of 'Decent', 'Non-decent' and Potentially Non-decent'

Figures used: 'Decent' = 4376,  'Non-decent' = 199 and Potentially Non-decent' = 10009

Appreciate any help.

Cheers

Chris

1 Solution

Accepted Solutions
Not applicable
Author

Use set analysis:

=Num(Count ({<[Decency]= {Decent}>} [Decency])/ Count({1} [Decency]), '#,##0.00%')

View solution in original post

4 Replies
Not applicable
Author

hi

try this

Num(Count ([Decency]= 'Decent')/ Count(TOTAL [Decency]), '#.##0') & '%'

tresesco
MVP
MVP

Total keyword is used to ignore dimensions in charts. So in text box it has no relavance, you may try {1} like:

Num(Count ([Decency]= 'Decent')/ Count({1}[Decency]), '#.##%')

Anonymous
Not applicable
Author

Try this


(Count ([Decency]= 'Decent')/ Count(TOTAL [Decency]))*100 & '%',

Not applicable
Author

Use set analysis:

=Num(Count ({<[Decency]= {Decent}>} [Decency])/ Count({1} [Decency]), '#,##0.00%')