Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Contributor

Bar Chart Expression with Distinct

My bar chart are without dimensions, Hence in the expression I want to aggregate based on distinct values for a particular dimension for e.g.

Current Expression:

Sum(Tender Values)

Requirement:

I want to aggregate Tender Values based on distinct values for Tender Lines.

3 Replies
Highlighted

Re: Bar Chart Expression with Distinct

May be like this:

Sum(Aggr([Tender Values], [Tender Lines]))

Highlighted

Re: Bar Chart Expression with Distinct

Or you can try one of these also:

Sum(Aggr(Only([Tender Values]), [Tender Lines]))

or

Sum(Aggr(Avg([Tender Values]), [Tender Lines]))


or

Sum(Aggr(Sum(DISTINCT [Tender Values]), [Tender Lines]))


or

Sum(Aggr(Min([Tender Values]), [Tender Lines]))

or

Sum(Aggr(Max([Tender Values]), [Tender Lines]))

Highlighted
MVP
MVP

Re: Bar Chart Expression with Distinct

If you mean that  you would like to use an expression for each value of Tender Lines, then the best way is to use Tender Lines a a dimension. But assuming that there are a few, fixed values of Tender Lines, then you could use expressions of the form:

=Sum({<[Tender Lines] = {'first value'}>} [Tender Values])

=Sum({<[Tender Lines] = {'second value'}>} [Tender Values])

...

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein