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: 
Anonymous
Not applicable

class function Label

Hi Guru's,

I want to display Labels for my Combo chart are :<ok,0-10k,10-100k,100K-1M,1M+

how to achieve this using Class function

Please find the attached screen shot and Qvw

Thanks,

Raj

1 Solution

Accepted Solutions
sunny_talwar

Try this instead of Class()

=Aggr(

If(Sum(Invoices) < 0, Dual('< 0', 1),

If(Sum(Invoices) < 10000, Dual('0-10k', 2),

If(Sum(Invoices) < 100000, Dual('10-100k', 3),

If(Sum(Invoices) < 1000000, Dual('100k-1M', 4), Dual('1M+', 5)))))

, [Invoice Number])

View solution in original post

4 Replies
sunny_talwar

Try this instead of Class()

=Aggr(

If(Sum(Invoices) < 0, Dual('< 0', 1),

If(Sum(Invoices) < 10000, Dual('0-10k', 2),

If(Sum(Invoices) < 100000, Dual('10-100k', 3),

If(Sum(Invoices) < 1000000, Dual('100k-1M', 4), Dual('1M+', 5)))))

, [Invoice Number])

Chanty4u
MVP
MVP

check sample age bucket

Age Buckets.qvw

Anonymous
Not applicable
Author

Hi Sunny ,

Thanks for your time.

in place of Sum (Invoices) i have expression as below

sum({<

[Invoices.TRANSACTION_COMPLETE_FLAG]={'Y'}

>} [USD_Invoices.DISTRIBUTION_AMOUNT])

+

sum([EuticalsInvoices.Value Invoiced $])

+

sum([GadeaDP.FA Base USD])

How to use this in expression

Thanks,

raj

sunny_talwar

May be this

=Aggr(

If(

RangeSum(Sum({<[Invoices.TRANSACTION_COMPLETE_FLAG]={'Y'}>} [USD_Invoices.DISTRIBUTION_AMOUNT]),

Sum([EuticalsInvoices.Value Invoiced $]),

Sum([GadeaDP.FA Base USD])) < 0, Dual('< 0', 1),


If(

RangeSum(Sum({<[Invoices.TRANSACTION_COMPLETE_FLAG]={'Y'}>} [USD_Invoices.DISTRIBUTION_AMOUNT]),

Sum([EuticalsInvoices.Value Invoiced $]),

Sum([GadeaDP.FA Base USD])) < 10000, Dual('0-10k', 2),


If(

RangeSum(Sum({<[Invoices.TRANSACTION_COMPLETE_FLAG]={'Y'}>} [USD_Invoices.DISTRIBUTION_AMOUNT]),

Sum([EuticalsInvoices.Value Invoiced $]),

Sum([GadeaDP.FA Base USD])) < 100000, Dual('10-100k', 3),


If(

RangeSum(Sum({<[Invoices.TRANSACTION_COMPLETE_FLAG]={'Y'}>} [USD_Invoices.DISTRIBUTION_AMOUNT]),

Sum([EuticalsInvoices.Value Invoiced $]),

Sum([GadeaDP.FA Base USD])) < 1000000, Dual('100k-1M', 4), Dual('1M+', 5)))))

, [Invoice Number])