Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Save $300 - Register for QlikWorld (formerly Qonnections) by January 31st: Learn More
Highlighted
Not applicable

Formatting a Count Function

Hello,

I have this function: Count(distinct {$<[DATE MODIFIED.autoCalendar.QuartersAgo]={">=0<=4"}>} [ASSET TITLE])

Which counts the asset titles that have a Date Modified of between 0 and 4 quarters ago. I want to count the asset titles that have a date modified of between 0-4 quarters ago that DON'T have an x in the 'aging exemption field', which would be denoted by ........... [Aging Exemption] = 'x'

How is this worked into the count function?

Thanks.

1 Solution

Accepted Solutions

Re: Formatting a Count Function

May be try this

Count(distinct{$<[DATE MODIFIED.autoCalendar.QuartersAgo]={">4<=12"}, [Age Exempt] *= {'No'}>}[ASSET TITLE])

View solution in original post

9 Replies

Re: Formatting a Count Function

May be this

Count(DISTINCT {$<[DATE MODIFIED.autoCalendar.QuartersAgo]={">=0<=4"}, [Aging Exemption] -= {'x'}>} [ASSET TITLE])

Not applicable

Re: Formatting a Count Function

This did not work, came up as 0

Re: Formatting a Count Function

Have you made selection in Aging Exemption field? May be this

Count(DISTINCT {$<[DATE MODIFIED.autoCalendar.QuartersAgo]={">=0<=4"}, [Aging Exemption] = -{'x'}>} [ASSET TITLE])

Not applicable

Re: Formatting a Count Function

Sorry, still not working. I see how it should be, but it just counts 0. these are what I have tried. I changed the Age Exempt column and put a yes or no, so now I am trying to count all the 0-4 quarter ago assets that are NOT age exempt, and have a no.Capture.PNG

Re: Formatting a Count Function

Would you be able to share a sample of your app?

Not applicable

Re: Formatting a Count Function

Sure. Here is a sample of it.

Essentially, I don't want the assets that have 'yes' as Age exempt to be included in the KPI's located at the top. So, if you click the small area on the far right side but left of the chart, and choose 'yes', 2 links should show. One has no date, and one has a date highlighted in yellow. The KPI that is 1-2 years old will say '1' asset. I want the kpi to say 0, because I dont want any of those kpis to count the assets that are exempt. The kpis are all master items, and I have been working in the '#Assets 1 Yr Past' Master measure.

Re: Formatting a Count Function

checking now

Re: Formatting a Count Function

May be try this

Count(distinct{$<[DATE MODIFIED.autoCalendar.QuartersAgo]={">4<=12"}, [Age Exempt] *= {'No'}>}[ASSET TITLE])

View solution in original post

Not applicable

Re: Formatting a Count Function

Thank you so much! This worked