Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

class() function does not work

Good Morning,

I am trying to use the class() function in a table.

Unfortunately the output is not as supposed to be:

class(
sum(aggr(sum({<Opportunity_Type={'OPEN'}, kickIN={">=$(vL.FieldSelection_Minus1_PB) <= $(vL.FieldSelection_Plus2_PB)"}>}[Open: Total estimated weekly  revenue])
*
sum({<Opportunity_Type={'OPEN'}, kickIN={">=$(vL.FieldSelection_Minus1_PB) <= $(vL.FieldSelection_Plus2_PB)"}>}[Rate Standard]), Opportunity_ID))
  /
sum({<Rate_Standard_Zero_Flag={'N'},Opportunity_Type={'OPEN'}, kickIN={">=$(vL.FieldSelection_Minus1_PB) <= $(vL.FieldSelection_Plus2_PB)"}>}[Open: Total estimated weekly revenue])
,50
)

Instead of a range like 50 <= x < 100, the output is a single number, rounded by the inverval (in this case 50). E.g. the output of my formula is 1460 and when I do the class function around my formula the output is 1450.

Is my formula to complex for the class function? Is there a workaround?

1 Solution

Accepted Solutions
Highlighted
MVP & Luminary
MVP & Luminary

Re: class() function does not work

Class() returned a dual-value and if you not used the expression-default within the tab numbers or you wrapped it within a num() function you will get only the numeric value and not the string-representation.

- Marcus

View solution in original post

2 Replies
Highlighted
MVP & Luminary
MVP & Luminary

Re: class() function does not work

Class() returned a dual-value and if you not used the expression-default within the tab numbers or you wrapped it within a num() function you will get only the numeric value and not the string-representation.

- Marcus

View solution in original post

Highlighted
Creator
Creator

Re: class() function does not work

=Replace(Aggr(class(
sum(aggr(sum({<Opportunity_Type={'OPEN'}, kickIN={">=$(vL.FieldSelection_Minus1_PB) <= $(vL.FieldSelection_Plus2_PB)"}>}[Open: Total estimated weekly  revenue])
*
sum({<Opportunity_Type={'OPEN'}, kickIN={">=$(vL.FieldSelection_Minus1_PB) <= $(vL.FieldSelection_Plus2_PB)"}>}[Rate Standard]),Opportunity_ID))
  /
sum({<Rate_Standard_Zero_Flag={'N'},Opportunity_Type={'OPEN'}, kickIN={">=$(vL.FieldSelection_Minus1_PB) <= $(vL.FieldSelection_Plus2_PB)"}>}[Open: Total estimated weekly revenue])

),Opportunity_ID), '<= x <', ' - ')