Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Pavan208a
Contributor
Contributor

Bucket creation and count of ID's under each bucket

Hi Qlikers,

 

I have two fields(Net Amount and Gross Amount) which are coming from two different tables Sales table and Profit table. I need to show variance between net amount and gross amount in the straight table in Qliksense which is done by using common ID between the two tables.

I have also created a bucket in the table which shows three values '<1Mil', '1-10 MIl' and '>10 Mil' based on the variance(Netamount - gross amount) which is working fine.

 

The problem is the user wants to show in a separate table the count of ID's under each bucket which i am not able to show (PS: the two tables in the backend can not be merged and thet should be loaded independently adn this task shuld be done in the front end).

 

Below are the fields that i have in the straight table.

ID, Salesmonth, Net amount, Grossamount, Variance(Net-Gross), Bucket.

 

I have tried the below expression to count the ID's which are '<1Mil', but it does not work.

=Count(distinct(If(aggr(Sum(Netamount)-Sum(Gross Amount)0, SalesMonth, ID)<1000000, ID)).

 

Kindly help as its an urgent need for my project basis.

 

Best Regards,

Pavan

@KoushikS @tresesco @Anil_Babu_Samineni @rwunderlich  @ankushs

1 Reply
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

If you already have a Dimension for Bucket, can you count the Ids with a simple:

Count(Distinct ID)

-Rob