Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
mahmooddba
Contributor II
Contributor II

Sales Percentage While Selecting Filter

Hi,

I would like to get sales percentage for selective customer group over the total sales. I have tried ignoring the customer group field but it's not working please find the attached details. Can anyone please advise me.

1 Solution

Accepted Solutions
mahmooddba
Contributor II
Contributor II
Author

Hi Omar,

I really appreciate your time & support. Initially formula was not working because I have used IF condition in filter dimension later I used IF condition in script and it worked fine.

Sum(TOTSALES_NETAMOUNT_ALL)

/

SUM(TOTAL {<[TOTSALES_PAYER NAME]=,[TOTSALES_INSURANCETYPE]=>}TOTSALES_NETAMOUNT_ALL)

Regards

Mahmood

View solution in original post

4 Replies
OmarBenSalem

create a straight table:

as a dimension: Customer

as a measure : sum(Measure) / sum(total {<Customer>} Measure)

mahmooddba
Contributor II
Contributor II
Author

Hi Omar,

Thanks for your time & response  I tried but not working out.

Sum(TOTSALES_NETAMOUNT_ALL)

/

Sum(TOTAL {<[TOTSALES_PAYER NAME]=>}TOTSALES_NETAMOUNT_ALL)

NOTE: PAYER IS CUSTOMER

Regards

Mahmood

OmarBenSalem

Create a table

Dim customer

Measures

Sum(sales)

Sum(total sales)

And please share an image of the resulting table

mahmooddba
Contributor II
Contributor II
Author

Hi Omar,

I really appreciate your time & support. Initially formula was not working because I have used IF condition in filter dimension later I used IF condition in script and it worked fine.

Sum(TOTSALES_NETAMOUNT_ALL)

/

SUM(TOTAL {<[TOTSALES_PAYER NAME]=,[TOTSALES_INSURANCETYPE]=>}TOTSALES_NETAMOUNT_ALL)

Regards

Mahmood