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: 
shannoypaul
Creator
Creator

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
sunny_talwar

May be like this:

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

sunny_talwar

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]))

jonathandienst
Partner - Champion III
Partner - Champion III

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