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: 
Not applicable

Eliminating lines for a total

Hi QV Community,

I have an expression in a straight table where all I want is the total (min, max and avg) but I'm getting a total per auction.

My expression is:

=if(Auction_ID > '13520072', count (distinct (Buyer_Number)))

I only have one dimension which is Auction_ID.

The result I'm getting is

error loading image

The result I want is:

error loading image

Please could someone assist me.

thanks,

Shane

6 Replies
sparur
Specialist II
Specialist II

Hello.

If I understand you, you should use a Set Analysis:

count( {<Auction_ID = {">13520072">} distinct Buyer_Number)

Not applicable
Author

hi, tried that, it still gives me a line by line breakdown of Buyer_Number per Auction.

Not applicable
Author

All that has ever worked for me in this respect is to leave the dimension blank. Remove Auction_id and it should leave you with the total.

Not applicable
Author

Thanks for the reply DK_ASN.

When I remove the dimension, the outcome changes and the total is then incorrect.

Not applicable
Author

Try an aggr. Something in the line of (un-tested):

count(distinct(aggr(if(Auction_ID > '13520072',Buyer_Number),Buyer_Number,Auction_ID)))

Not applicable
Author

still gave me the same outcome but I came up with a different solution. I used the loading script to get what I want:

"Buy_Count":

LOAD

count ("Buyer_ID") AS "Buyer_Count"

RESIDENT Deposits

WHERE "Auction_ID" > '13520072'

GROUP BY "Auction_ID";

Thanks for the responses