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: 
vvvvvvizard
Partner - Specialist
Partner - Specialist

Class function Qliksense

In Qlikview I would create a histogram by adding a bar chart , for dimension I would have eg  Class(Sum(Sales),1000)

for expression Count(Distinct Product_Name)

Now in Qliksense in a dimension if you say Class(Sum(Sales),1000) you receive an invalid dimension error , ,only Class(Sales,1000) is allowed which then gives the incorrect results

1 Solution

Accepted Solutions
vvvvvvizard
Partner - Specialist
Partner - Specialist
Author

= Class(Aggr(Sum({<QVTransTypeID={6}>} Units),ProductFullName),10)

Found the answer , had the aggr in the class function with the dimension name

View solution in original post

5 Replies
petter
Partner - Champion III
Partner - Champion III

only Class(Sum(Sales),1000)  will not work anyway it has to be written


=Class(Sales,1000)


2018-04-18 13_07_55-Qlik Sense Desktop.png



vvvvvvizard
Partner - Specialist
Partner - Specialist
Author

Why is the same product showing up in multiple bins , its should display in one bin onlyCapture.PNG

vvvvvvizard
Partner - Specialist
Partner - Specialist
Author

= Class(Aggr(Sum({<QVTransTypeID={6}>} Units),ProductFullName),10)

Found the answer , had the aggr in the class function with the dimension name

petter
Partner - Champion III
Partner - Champion III

In this case you will have to use it like this as a measure:

=Class( Sum( {<QVTransTypeID={6}>} Units) , 10 )

or if you put a label on the third column and call it for instance UNITS you could write:

=Class( [UNITS] , 10 )

petter
Partner - Champion III
Partner - Champion III

The Aggr is not necessary if you do as I told you below... an Aggr is more costly performance-wise.....

Your formula will count the units independent of the date unless you include date as a dimension in your Aggr() function.