Forum Discussion
single slicer to filter two tables
i have a table which shows region , products and sales i am using a slicer to filter through different regions what i want is to see products in one region and their sales but i want to also see same products in different regions.
| region | product | sales |
| R1 | p1 | 5950 |
| R1 | p2 | 7598 |
| R1 | p3 | 5377 |
| R1 | p4 | 3562 |
| R1 | p5 | 6363 |
| R1 | p6 | 3238 |
| R2 | p7 | 1780 |
| R2 | p1 | 1691 |
| R2 | p2 | 1001 |
| R2 | p3 | 5426 |
| R2 | p4 | 2950 |
| R2 | p5 | 9799 |
| R2 | p6 | 3774 |
| R3 | p1 | 9835 |
| R3 | p2 | 1870 |
| R3 | p3 | 9881 |
| R3 | p4 | 8243 |
| R3 | p5 | 5838 |
| R3 | p6 | 4995 |
if i insert a slicer based on regions and select R1 , it gives me products & sales available in that region (for ex. R1) in one table, i am replicating the same table but in that replicated table i want to see sales available in other regions (R2,R3) for (same products as shown in R1) . i.e. a single slicer to filter two tables.
1 Reply
- amitchandak
Super User
abhishekdas72 , You need create an independent table with distinct region and create measure
m1= calculate(sum(Sale[sales]), filter(Sales, Sales[region] in value(region[region]) ) )
m2=
var _tab = summarize(filter(allselected(sales), Sales[region] in value(region[region]) ), sales[product])
return
calculate(sum(Sale[sales]), filter(Sales, sales[product] in _tab ) )