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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
marco_puccetti
Partner - Creator
Partner - Creator

Set Analysis

Hello i need to know if is anything wrong in this expression, it doesn't return me the expected values:

Count({<[FIELD A]={"=$([FIELD A])-1"}}DISTINCT [FIELD B])

Thanks

Marco

1 Solution

Accepted Solutions
maxgro
MVP
MVP

if you only have year as dimension above (without set analysis) should works

1.png

View solution in original post

21 Replies
sunny_talwar

Try this may be:

Count({<[FIELD A]={"=$([FIELD A])-1"}>}DISTINCT [FIELD B])

sunny_talwar

Or

Count({<[FIELD A]={"$(=[FIELD A])-1"}>}DISTINCT [FIELD B])

marco_puccetti
Partner - Creator
Partner - Creator
Author

Hello with this statement:

=Count({<[FIELD A]={"=$([FIELD A])-1"}>}DISTINCT [FIELD B])

return exactly the same data returned with this one:

Count(distinct [FIELD B])

applied on a selection on FIELD A.

Is it possible?

Thanks

Marco

Not applicable

Is FIELDA only a number list from where you are selecting only one value? If yes, try this
=Count({<[FIELD A]={"=$([FIELD A]-1)"}>}DISTINCT [FIELD B])

sunny_talwar

What filters are you trying to put through your set analysis ({<[FIELD A]={"=$([FIELD A])-1"}>})?

marco_puccetti
Partner - Creator
Partner - Creator
Author

Field A is a list of year and the table rows get the data from that list.

I have tried with the below expression but it doesn't print the previous year data.

Count({<={"=$(-1)"}>}DISTINCT )

Thanks

Marco

marco_puccetti
Partner - Creator
Partner - Creator
Author

I have tried to check the correct form of the "$(-1)" ststement being an year but the computated dimension is not working with this stetement: =$(-1).

Anyone can explain me how to get this data inside the table?

Thanks

Marco

sasiparupudi1
Master III
Master III

try

Count({<[FIELD A]={"=[FIELD A]-1"}}DISTINCT [FIELD B])

marco_puccetti
Partner - Creator
Partner - Creator
Author

It doesn't work.

I have tried also with this but it's still not working

Count({<={"=$(=(-1))"}>}DISTINCT )

Thanks

Marco