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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
billuran
Partner - Creator
Partner - Creator

Count frequency of values calulcated

Hello, I have a data set basic description:

Date,ID,Value

and a Mapping Table:

ID, Weight

I want to then create a table that has field called CALCCOUNT with integers 0-100

I want to then count the number of dates where sum of the round((Value*Weight),0) for that date equals CALCOUNT

Example Chart I would like:

CALCOUNTFrequency of Dates
01
125
24
...45
9955
10023

Thank you for your help!

1 Solution

Accepted Solutions
sunny_talwar

I don't have the data to test it, but you might need an Island table with all possible values... lets call it AllValues

Dimension

AllValues

Expression

Sum(Aggr(If(Sum(Value) = AllValues, 1, 0), Dates, AllValues)) + Sum({1} 0)

Now uncheck 'Suppress Zero Values' on the presentation tab...

View solution in original post

10 Replies
sunny_talwar

May be this

Dimension

Aggr(round((Value*Weight),0), ID)\

Expression

Count(DISTINCT ID)

billuran
Partner - Creator
Partner - Creator
Author

Thanks Sunny, I still need to show integers with 0 counts.

sunny_talwar

Uncheck 'Suppress Zero Values' on the presentation tab and see if that works

sunny_talwar

What's wrong with this one?

sunny_talwar

None of my suggestions worked for you? or what I said made so sense whatsoever?

billuran
Partner - Creator
Partner - Creator
Author

They did not work, but I did bad job explaining. Here i simplified it a bit:

Date,ID,Values

I want to then create a table that has field called AGGRValue with integers 0-100

I want to then count the number of dates where the sum of values for each total date equals the AGGRValue

I did  RecNo() as AGGRValue

Autogenerate (100);

So if 55 dates sum to 99 each then I want the frequency of dates to be 55 and where 25 dates equal the sum of 1 each it will show 25

Example Chart I would like:

AGGRValueCount the number of dates that equal teh AGGRValue
01
125
24
...45
9955
10023

Thank you for your help!

sunny_talwar

Okay then try this

Dimension

Aggr(Sum(Values), Date)

Expression

Count(DISTINCT Date)

billuran
Partner - Creator
Partner - Creator
Author

Thanks Sunny, this kind of worked. I need to show an array of values regardless if the values are present. IE: 1-100.

Whats happening now as an example, 2 is never a sum of values in the data set but i need the end user to see that 2 has 0 dates associated when they export the data. Right now it will show values in a table 0,1,3,4 etc...with appropriate counts.

sunny_talwar

I don't have the data to test it, but you might need an Island table with all possible values... lets call it AllValues

Dimension

AllValues

Expression

Sum(Aggr(If(Sum(Value) = AllValues, 1, 0), Dates, AllValues)) + Sum({1} 0)

Now uncheck 'Suppress Zero Values' on the presentation tab...