Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
cicciput
Contributor III
Contributor III

Count top customers over a certain threshold

This is tricky...

I have a fact table with sales made by customers, now let's assume:

  • a top customer has sum of sales > 1.000€
  • a luxury sale is a sale > 100€

I know I can sum luxury sales like this:

Sum({< Sales = {">100"} >} Sales)

I know I can count customers with at least 1000€ sales like this:

Sum({< %AccountID = {"=Sum(Sales) > 1000"} >} Account.DCF)

Now what if I want to count customers with at least 1000€ sales of luxury objects?

This does not work...

Sum({< %AccountID = {"=Sum({< Sales = {">100"} >} Sales) > 1000"} >} Account.DCF)


It's worth pointing out this is a What if application so that 1.000 and 100 values above change on user action on 2 sliders.


Thanks for your help!

1 Solution

Accepted Solutions
sunny_talwar

Try this:

Sum({< %AccountID = {"=Sum({<Sales = {'>100'} >} Sales) > 1000"} >} Account.DCF)

View solution in original post

4 Replies
sunny_talwar

Try this:

Sum({< %AccountID = {"=Sum({<Sales = {'>100'} >} Sales) > 1000"} >} Account.DCF)

jagan
Luminary Alumni
Luminary Alumni

Hi,

You need to use single quotes for >100 in the set analysis.

Sum({< %AccountID = {"=Sum({< Sales = {'>100'} >} Sales) > 1000"} >} Account.DCF)

Regards,

Jagan.


MK_QSL
MVP
MVP

=SUM({<%AccountID = {"=SUM(Sales)>1000"}>*<Sales = {">100"}>}Account.DCF)

cicciput
Contributor III
Contributor III
Author

Thanks sunindia!

Thanks also others who answered too!

Cheers