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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

expression

Hi all,

We are looking to try and use a text box or statistics box that will get us a certain answer.

We want the text box/stats box to tell us number of properties in the block. Curently when we select the box it includes all properties. So on the example below it says 6; however, in reality it is 5. Aberdeen is the 'block' itslef, not a property within it. So thinking solution is an expression in the text/stats box. Here is the data below. As the block and UPRN are unique thinking we could do soemthing her for example 'count if block = yes.'

Can anyone help with the expression?

Address                   Block          UPRN

1 Aberdeen               -               10703101

2 Aberdeen               -              10703101

3 Aberdeen               -             10703101

4 Aberdeen               -              10703101

5 Aberdeen               -             10703101

Aberdeen               Yes          10703101

Chris

1 Solution

Accepted Solutions
Not applicable
Author

 

=count(DISTINCT {1<UPRN = {"=len(trim(Block)) =0"} >} UPRN)

should be better

Fabrice

View solution in original post

5 Replies
Not applicable
Author

Chris,

Try this:

Count(Distinct {<Block = {"<> Yes"} > UPRN}

Distinct or NoDistinct accroding the unicity or not of the field

Fabrice

Not applicable
Author

Hi Fabrice,

Doesn't seem to like it.

Says 'error in expression'

Chris

Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

Count(Distinct {<Block -= {'Yes'} >} UPRN}

Help users find answers! Don't forget to mark a solution that worked for you!
Not applicable
Author

It likes the expression; however, gives a result of 1. The result I need is 5 which is any of the properties where block = '-' or null

Chris

Not applicable
Author

 

=count(DISTINCT {1<UPRN = {"=len(trim(Block)) =0"} >} UPRN)

should be better

Fabrice