Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
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
sunny_talwar

May be try this

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

View solution in original post

9 Replies
sunny_talwar

May be this

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

Not applicable
Author

This did not work, came up as 0

sunny_talwar

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
Author

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

sunny_talwar

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

Not applicable
Author

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.

sunny_talwar

checking now

sunny_talwar

May be try this

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

Not applicable
Author

Thank you so much! This worked