Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Dimensions based on Total and Aggr

Hi,

I am trying to create a table / bar chart in the UI that shows Sales by a dimension built in the UI.

The dimension is meant to categorize sales by both customer and year: below 50,000 will get group 'A', other wise 'B'.

For ex: customer no. 1 with sales of 10,000 in 2017 will be in group A, while the same customer in 2018 with 60,000 will be in group B.

However, whenever I select "A", i get both 'A' AND 'B', and visa versa.

I also need the Formula to allow use of Set Analysis.

What is wrong here? 

=AGGR(IF(sum({<DataBase={'Customer Orders'}>} TOTAL <CustomerID,Year> Amount) < 50000,'A','B'),CustomerID,Year)

Thank you,

Sandra

11 Replies
sunny_talwar

Try this

=Aggr(If(Sum({<DataBase={'Customer Orders'}, CustomerID, Year>} Amount) < 50000,'A','B'), CustomerID, Year)

Anonymous
Not applicable
Author

thanks but same problem still

sunny_talwar

How about if you use this?

=Aggr(If(Sum({1<DataBase={'Customer Orders'}>} Amount) < 50000,'A','B'), CustomerID, Year)

Anonymous
Not applicable
Author

Thanks again bur still not showing good filter.

I would add a print screen here if I new how..

Sandra

Anonymous
Not applicable
Author

Thanks!

Here is the print screen

I have selected A but still the table shows B as well.

Sandra

Capture.PNG

Anonymous
Not applicable
Author

by the way,

if I remove the 1 from the set analysis of the MEASURE, I still get the exact same result

Sandra

sunny_talwar

What is the expression for your filter?

Anonymous
Not applicable
Author

the filter is the same as the Dimenstion column - same expression.

=Aggr(If(Sum({1<DataBase={'Customer Orders'}>} Amount) < 50000,'A','B'), CustomerID, Year)