Forum Discussion

jpreyes's avatar
jpreyes
New Member
5 years ago

Adding custom total column to matrix visualization

Hi all

 

I have a question regarding how to create a custom "total" column for my matrix visualization. I'll try to explain the diferent data I have. Let's say I have three tables:

 

1. Customers (customer_id, name, last name, etc...)

2. Inventory (product_id, product_name)

3. Sales (product_id, customer_id, sale_status)

 

The important thing here is sale_status, which is an integer (1 or 2) that internally signs the stage of the sale process. When I create my matrix, the rows will contain Customers[name], the columns the Inventory[product_name] and the values are the max of Sales[sale_status] for said intersection (there can be several registers as the sales moves forward). So, every cell in the matrix will show the status (1 or 2) of the sale for a client trying to acquire certain product, or will be empty if the client is not involved in a purchase operation with said product.

 

So, now here's my question: I want to create a column at the end of the matrix that counts the number of product a client has in status 2, and a last row that counts how many clients have said product in status 2. I've tried using measures but the thing is, I'm not sure where to create said measure, as adding it will be added as value and therefore will appear in each cell.

 

I Hope I've been clear enough. I'll be happy to answer any question regarding the context of this problem. Thanks!

1 Reply