Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is it possible to do a count(sub total)?
For instance,
ID1 ID2 Count
a 1 4
a 2 4
a 3 4
a 4 4
b 5 3
b 6 3
b 7 3
For the IDs, I want to to a subtotal of how many ID2 are in ID1.
In a chart expression. I actually just figured it out. Count(DISTINCT TOTAL <ID1> ID2) gave the what I needed. Thanks for the reply.
Are you looking to do it in your load script or as an expression in your app?
In the load script, I would probably use a sub-query. You would need to group by ID1 and do a Count of ID2. It doesn't really work to do that out of an Inline, but it should work on a Database or Table File.
To do it in an expression, I would use:
Aggr(NODISTINCT Count(DISTINCT ID2), ID1)
I've attached a sample.
In a chart expression. I actually just figured it out. Count(DISTINCT TOTAL <ID1> ID2) gave the what I needed. Thanks for the reply.