Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

d_caprelli
Contributor II

Filter distinct Count() for only a condition

Hi i need to filter my Count() only when a condition is verified, in details:

count.png

i need to Count, only items where my field ANNO_EMI = ANNO + 1

28 Replies
arvind_patil
Valued Contributor II

Re: Filter distinct Count() for only a condition

Hi Daniele,

may be like this:

Count (Distinct {<ANNO_EMI ={'ANNO + 1'}>} PDR)


Thanks,

Arvind Patil

d_caprelli
Contributor II

Re: Filter distinct Count() for only a condition

I think there are an error becouse if i write like this it not show me nothing but if i write:

Count (Distinct {<ANNO_EMI ={'04'}>} PDR)


it show me the line..... i think the error is in the field ANNO + 1

MVP
MVP

Re: Filter distinct Count() for only a condition

May be this

Count(DISTINCT {<ANNO_EMI = {"$(=Num(ANNO+1, '00'))"}>} PDR)

Highlighted
d_caprelli
Contributor II

Re: Filter distinct Count() for only a condition

No, i think problem is in the Field ANNO, the formula not take it, becouse is i write :

Count(DISTINCT {<MESE_EMISSIONE = {"$(=Num(2+1, '00'))"}>} PDR)

it take me the value and design the line in the chart

MVP
MVP

Re: Filter distinct Count() for only a condition

May be there are multiple values and you need to use Max() or Min() function

Count(DISTINCT {<ANNO_EMI = {"$(=Num(Max(ANNO)+1, '00'))"}>} PDR)

d_caprelli
Contributor II

Re: Filter distinct Count() for only a condition

graphann.png

Look at the picture, it not show me nothing..... my field MESE_EMISSIONE is in my database with value format 01... 12 and MESE_COMPETENZA with the same format.... if i use that kind of formula with replace MESE_COMPETENZA with  a number value, chart show me values

Count(DISTINCT {<MESE_EMISSIONE = {"$(=Num(2+1, '00'))"}>} PDR)

MVP
MVP

Re: Filter distinct Count() for only a condition

What do you get when you add this to a text box object?

=Num(Max(ANNO)+1, '00')

Do you get 03?

d_caprelli
Contributor II

Re: Filter distinct Count() for only a condition

I get all these values, like you see in the line chart

MESE.png

MVP
MVP

Re: Filter distinct Count() for only a condition

I was asking for this expression in a text box object, not a line chart?

Community Browser