Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
vivek1864
Contributor
Contributor

Distinct Sum Aggregation issues

Hello Everyone,

 

I'm new to Qlik and have been facing issues with aggr distinct sum. When I use below function to calculate the selling price, I get different number to the actual selling price. Its really strange and difficult to figure out what possibly could be wrong.

selling price = sum(aggr(sum(distinct selling price),competitor, material))

Competitor Material Actual Selling Price Selling Price
A 1 1995 1953
B 1 1995 1953
C 1 1995 1953
A 2 234 230
B 2 234 230
C 2  234 230
Labels (1)
3 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Why the Aggr()?  Why not Sum(SellingPrice) or Avg(SellingPrice)?

-Rob

vivek1864
Contributor
Contributor
Author

I only need to see distinct values when calculating the totals. Sum will give me dups and avg will take avg of entire sales which I don't want

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You have multiple occurrences of selling price? You seem to be taking care of that with Sum(Distinct...

I'm not understanding your data. Can you post some sample data?

-Rob