Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Calculating Percentage using different tables

Hi, 

 

I have two tables, one database of shipped sales (Digital_Sales) and of refunds processed by a distribution centre (Database)

 

 

 

The two are connected via a 3rd and 4th table linking the 'date processed in dc_date' to 'fin year period'. 

 

What I'm trying to achieve is to get a visualisation of refunds as a % of sales grouped by period like in the excel example below. 

 

 

I've tried performing this with the below measure.

 

Measure = sum(Database[RETURN_VALUE_SUM])/sum('Digital Sales'[Shipped_Sales])*100

I think the problem is the connection (see the bottom). When I build a table for return sum and sales sum by period, it's just summing everything for the sales.

 

Any help will be greatly appriecated. 

 

 

 

 

 

 

 

 

  • Anonymous's avatar
    Anonymous
    8 years ago

    Nevermind, fixed it.    The 'Cross Section filter' relationship between 'Period Definition' and 'Year List' needed to be both ways. It defaults to Single. 

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Nevermind, fixed it.    The 'Cross Section filter' relationship between 'Period Definition' and 'Year List' needed to be both ways. It defaults to Single.